diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-05-22 08:54:25 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-05-22 08:54:25 +0100 |
| commit | bdcfe308341edc47df628c0ff753f2cd39479273 (patch) | |
| tree | 50b2f429c375704a1102354456b783f2fd18d0c0 /src | |
| parent | 1c16a91fd6ee83bf18c26282184a44e6f32100e0 (diff) | |
Fix scrolling when cursor is on a wrapped part of the last displayed line
Diffstat (limited to 'src')
| -rw-r--r-- | src/highlighters.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/highlighters.cc b/src/highlighters.cc index 2de9c6bb..51758b6b 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -820,7 +820,7 @@ struct WrapHighlighter : Highlighter win_line += wrap_count + 1; // scroll window to keep cursor visible, and update range as lines gets removed - while (buf_line < cursor.line and setup.cursor_pos.line >= win_height) + while (setup.window_pos.line < cursor.line and setup.cursor_pos.line >= win_height) { auto removed_lines = 1 + line_wrap_count(setup.window_pos.line++); setup.cursor_pos.line -= removed_lines; |
