pub const SM_EXTEND: u8 = 0x01;
Extend the current selection to the new cursor position, instead of collapsing it to a point at p.
p