Track left to right for selections based on actual mouse positions

Cant use the selection boundaries as these can be programmatically
altered when extending selection by word or line.
This commit is contained in:
Kovid Goyal
2020-02-23 14:48:52 +05:30
parent 2f24588c66
commit 9c486f6e69
5 changed files with 62 additions and 63 deletions

View File

@@ -90,6 +90,8 @@ class TestMouse(BaseTest):
init()
press(), release(1)
self.ae(sel(), '1')
press(3), release(2)
self.ae(sel(), '3')
# Multi-line click release
init()
@@ -108,9 +110,9 @@ class TestMouse(BaseTest):
s.draw(' f gh')
s.draw(' stuv')
s.draw('X Y')
multi_click(x=1)
multi_click(x=1.6)
self.ae(sel(), 'ab')
move(3)
move(3.6)
self.ae(sel(), 'ab cd')
release(3, 1)
self.ae(sel(), 'ab cd f gh')