mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-23 00:38:10 +02:00
Initial implementation of half cell based selection
This commit is contained in:
@@ -17,12 +17,14 @@ def send_mouse_event(
|
||||
button=-1,
|
||||
modifiers=0,
|
||||
is_release=False,
|
||||
x=0,
|
||||
x=0.0,
|
||||
y=0,
|
||||
clear_click_queue=False
|
||||
clear_click_queue=False,
|
||||
):
|
||||
ix = int(x)
|
||||
in_left_half_of_cell = ix - int(x) > 0.5
|
||||
send_mock_mouse_event_to_window(
|
||||
window, button, modifiers, is_release, x, y, clear_click_queue
|
||||
window, button, modifiers, is_release, ix, y, clear_click_queue, in_left_half_of_cell
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -420,7 +420,7 @@ class TestScreen(BaseTest):
|
||||
if i != 0:
|
||||
s.carriage_return(), s.linefeed()
|
||||
s.draw(str(i) * s.columns)
|
||||
s.start_selection(0, 0, False)
|
||||
s.start_selection(0, 0)
|
||||
s.update_selection(4, 4)
|
||||
expected = ('55555', '\n66666', '\n77777', '\n88888', '\n99999')
|
||||
self.ae(s.text_for_selection(), expected)
|
||||
|
||||
Reference in New Issue
Block a user