Have right clicking to extend selection operate on the nearest selection boundary instead of the selection end. This matches both vim and xterm

This commit is contained in:
Kovid Goyal
2021-07-04 18:00:41 +05:30
parent 86a8b231f4
commit e732df46b8
4 changed files with 145 additions and 58 deletions

View File

@@ -177,7 +177,7 @@ class TestMouse(BaseTest):
multi_click(x=1, count=3)
self.ae(sel(), '123')
move(x=2, y=1)
self.ae(sel(), ' 123\n 456')
self.ae(sel(), '123\n 456')
release()
# Rectangle select
@@ -218,3 +218,8 @@ class TestMouse(BaseTest):
move(x=2, y=1, q='1234567')
release(x=3, y=1, button=GLFW_MOUSE_BUTTON_RIGHT)
self.ae(sel(), '12345678')
init()
press(y=2)
move(x=3.6, y=2, q='abcd')
press(x=3, y=0, button=GLFW_MOUSE_BUTTON_RIGHT)
self.ae(sel(), '4567890abcd')