diff options
author | 2019-09-20 23:25:48 -0400 | |
---|---|---|
committer | 2019-09-20 23:25:48 -0400 | |
commit | c51668199549617d07af4891af9aeae956bdd42c (patch) | |
tree | c61415e7803231564990779bc07146e5da42b694 /core/ui.lua | |
parent | b4e33d2425ddcc6d0ec907006a00702670abba3b (diff) |
Do not restore rectangular selection mode on buffer switch.
If the mode was not originally enabled, this just causes confusion.
Diffstat (limited to 'core/ui.lua')
-rw-r--r-- | core/ui.lua | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/core/ui.lua b/core/ui.lua index c39a0d15..3470392b 100644 --- a/core/ui.lua +++ b/core/ui.lua @@ -342,7 +342,6 @@ events_connect(events.BUFFER_BEFORE_SWITCH, function() local n = buffer.main_selection buffer._anchor_virtual_space = buffer.selection_n_anchor_virtual_space[n] buffer._caret_virtual_space = buffer.selection_n_caret_virtual_space[n] - buffer._sel_rectangle = buffer.selection_mode == buffer.SEL_RECTANGLE buffer._top_line = buffer:doc_line_from_visible(buffer.first_visible_line) buffer._x_offset = buffer.x_offset -- Save fold state. @@ -364,7 +363,6 @@ events_connect(events.BUFFER_AFTER_SWITCH, function() local n = buffer.main_selection buffer.selection_n_anchor_virtual_space[n] = buffer._anchor_virtual_space buffer.selection_n_caret_virtual_space[n] = buffer._caret_virtual_space - if buffer._sel_rectangle then buffer.selection_mode = buffer.SEL_RECTANGLE end buffer:choose_caret_x() buffer:line_scroll(0, buffer:visible_from_doc_line(buffer._top_line) - buffer.first_visible_line) |