diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-03-14 15:53:20 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-03-14 15:53:20 -0400 |
commit | 624399da9992b92f59daef4a79575c338e989e3e (patch) | |
tree | e45db1f1ab1a7ec5fc20617c07a253d286518ba0 /buffer.c | |
parent | 72592df32eddeb11ebdbb61a1c2437d82eb2f73b (diff) |
fix find menu scroll bug, for real this time
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -2182,6 +2182,9 @@ bool buffer_handle_click(Ted *ted, TextBuffer *buffer, v2 click, u8 times) { } if (buffer_pixels_to_pos(buffer, click, &buffer_pos)) { // user clicked on buffer + if (!ted->menu || buffer->is_line_buffer) { + ted_switch_to_buffer(ted, buffer); + } if (buffer == ted->active_buffer) { switch (ted->key_modifier) { case KEY_MODIFIER_SHIFT: @@ -2217,11 +2220,6 @@ bool buffer_handle_click(Ted *ted, TextBuffer *buffer, v2 click, u8 times) { } return true; } - // better to do this after handing click, because some stuff called by ted_switch_to_buffer - // needs to know the correct cursor pos - if (!ted->menu || buffer->is_line_buffer) { - ted_switch_to_buffer(ted, buffer); - } } return false; } |