diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-02-07 12:33:52 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2019-02-07 17:56:02 +0100 |
commit | 6e9ea5adcea9efc4e1423d6a7e88dbb8e5296331 (patch) | |
tree | 844ea02129cde5a9a796fc76e63ba124d57d791b /src/nvim/move.c | |
parent | fa2580f953204e919a13388ce5af2edf3afd0594 (diff) | |
download | rneovim-6e9ea5adcea9efc4e1423d6a7e88dbb8e5296331.tar.gz rneovim-6e9ea5adcea9efc4e1423d6a7e88dbb8e5296331.tar.bz2 rneovim-6e9ea5adcea9efc4e1423d6a7e88dbb8e5296331.zip |
screen: simplify scrolling code
Since the separation between internal screen and TUI, internal scroll
cannot FAIL. Delete the conditions for this.
Diffstat (limited to 'src/nvim/move.c')
-rw-r--r-- | src/nvim/move.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c index 610fd04ebc..869b877b02 100644 --- a/src/nvim/move.c +++ b/src/nvim/move.c @@ -925,12 +925,9 @@ void curs_columns( curwin->w_wrow -= extra; } + // extra could be either positive or negative extra = ((int)prev_skipcol - (int)curwin->w_skipcol) / width; - if (extra > 0) { - win_ins_lines(curwin, 0, extra); - } else if (extra < 0) { - win_del_lines(curwin, 0, -extra); - } + win_scroll_lines(curwin, 0, extra); } else { curwin->w_skipcol = 0; } |