Fixing isClickInSelection to cover missing cases

The following cases weren't working:

- The first character on single line selections
- The first row on multi-line selection
This commit is contained in:
Daniel Imms
2018-11-08 19:20:12 -08:00
committed by GitHub
parent 70981c7a29
commit 774793c7ca
+3 -2
View File
@@ -290,8 +290,9 @@ export class SelectionManager extends EventEmitter implements ISelectionManager
}
return (coords[1] > start[1] && coords[1] < end[1]) ||
(start[1] === end[1] && coords[1] === start[1] && coords[0] > start[0] && coords[0] < end[0]) ||
(start[1] < end[1] && coords[1] === end[1] && coords[0] < end[0]);
(start[1] === end[1] && coords[1] === start[1] && coords[0] >= start[0] && coords[0] < end[0]) ||
(start[1] < end[1] && coords[1] === end[1] && coords[0] < end[0]) ||
(start[1] < end[1] && coords[1] === start[1] && coords[0] >= start[0]);
}
/**