parent
f2cc7bc891
commit
8abf18209e
|
@ -1754,7 +1754,8 @@ void scroll_window(Context& context, LineCount offset, bool mouse_dragging)
|
||||||
|
|
||||||
win_pos.line = clamp(win_pos.line + offset, 0_line, line_count-1);
|
win_pos.line = clamp(win_pos.line + offset, 0_line, line_count-1);
|
||||||
|
|
||||||
Selection& main_selection = context.selections().main();
|
SelectionList& selections = context.selections();
|
||||||
|
Selection& main_selection = selections.main();
|
||||||
const BufferCoord anchor = main_selection.anchor();
|
const BufferCoord anchor = main_selection.anchor();
|
||||||
const BufferCoord cursor = main_selection.cursor();
|
const BufferCoord cursor = main_selection.cursor();
|
||||||
|
|
||||||
|
@ -1775,6 +1776,8 @@ void scroll_window(Context& context, LineCount offset, bool mouse_dragging)
|
||||||
|
|
||||||
window.set_position(win_pos);
|
window.set_position(win_pos);
|
||||||
main_selection = { new_anchor, new_cursor };
|
main_selection = { new_anchor, new_cursor };
|
||||||
|
|
||||||
|
selections.sort_and_merge_overlapping();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
1
test/regression/3478-crash-on-scroll/cmd
Normal file
1
test/regression/3478-crash-on-scroll/cmd
Normal file
|
@ -0,0 +1 @@
|
||||||
|
%sfoo<ret>(<pagedown>
|
2
test/regression/3478-crash-on-scroll/in
Normal file
2
test/regression/3478-crash-on-scroll/in
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
foo
|
||||||
|
foo
|
2
test/regression/3478-crash-on-scroll/out
Normal file
2
test/regression/3478-crash-on-scroll/out
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
foo
|
||||||
|
foo
|
Loading…
Reference in New Issue
Block a user