fix: other way around...

This commit is contained in:
əlemi 2023-11-16 06:50:55 +01:00
parent e7ad2723ba
commit 8267e1b890

View file

@ -52,7 +52,7 @@ impl Controller<CursorEvent> for CursorController {
/// enqueue a cursor event to be broadcast to current workspace
/// will automatically invert cursor start/end if they are inverted
fn send(&self, mut cursor: CursorPosition) -> Result<(), Error> {
if cursor.start() < cursor.end() {
if cursor.start() > cursor.end() {
std::mem::swap(&mut cursor.start, &mut cursor.end);
}
Ok(self.op.send(CursorEvent {