Fix #4070
This commit is contained in:
parent
cc261db606
commit
c71d8fe1cc
@ -3131,7 +3131,8 @@ screen_update_selection(Screen *self, index_type x, index_type y, bool in_left_h
|
||||
set_abs(abs_initial_start, s->initial_extent.start, s->initial_extent.scrolled_by);
|
||||
set_abs(abs_initial_end, s->initial_extent.end, s->initial_extent.scrolled_by);
|
||||
if (self->selections.extend_mode == EXTEND_WORD) {
|
||||
s->adjusting_start = selection_boundary_less_than(&abs_current_input, &abs_initial_end);
|
||||
if (s->adjusting_start) s->adjusting_start = selection_boundary_less_than(&abs_current_input, &abs_initial_end);
|
||||
else s->adjusting_start = selection_boundary_less_than(&abs_current_input, &abs_initial_start);
|
||||
} else {
|
||||
const unsigned int initial_line = abs_initial_start.y;
|
||||
if (initial_line == abs_current_input.y) {
|
||||
|
||||
@ -155,6 +155,20 @@ class TestMouse(BaseTest):
|
||||
move(0.2)
|
||||
release()
|
||||
self.ae(sel(), 'ab cd')
|
||||
multi_click(x=4.4)
|
||||
self.ae(sel(), 'cd')
|
||||
move(x=4.4, y=1)
|
||||
self.ae(sel(), 'cd f gh')
|
||||
move(x=4.4, y=0)
|
||||
self.ae(sel(), 'cd')
|
||||
release()
|
||||
multi_click(x=4.4, y=1)
|
||||
self.ae(sel(), 'gh')
|
||||
move(x=4.4, y=0)
|
||||
self.ae(sel(), 'cd f gh')
|
||||
move(x=4.4, y=1)
|
||||
self.ae(sel(), 'gh')
|
||||
release()
|
||||
|
||||
# Line select with drag
|
||||
s.reset()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user