aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/message.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2018-07-06 14:39:50 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2018-07-21 13:21:58 +0200
commit1adb01c120d04bdbf25cd4ea6151ecd5f2de3a72 (patch)
tree1f906f5f77b77bc0beecb33320ceb4c15ff5c58e /src/nvim/message.c
parent2134396074d86c344aaf43c3b839fd38c499fb69 (diff)
downloadrneovim-1adb01c120d04bdbf25cd4ea6151ecd5f2de3a72.tar.gz
rneovim-1adb01c120d04bdbf25cd4ea6151ecd5f2de3a72.tar.bz2
rneovim-1adb01c120d04bdbf25cd4ea6151ecd5f2de3a72.zip
ui: use line-based rather than char-based updates in screen.c
Add ext_newgrid and ext_hlstate extensions. These use predefined highlights and line-segment based updates, for efficiency and simplicity.. The ext_hlstate extension in addition allows semantic identification of builtin and syntax highlights. Reimplement the old char-based updates in the remote UI layer, for compatibility. For the moment, this is still the default. The bulitin TUI uses the new line-based protocol. cmdline uses curwin cursor position when ext_cmdline is active.
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r--src/nvim/message.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 9d4d421941..46fc9115b4 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -1888,11 +1888,9 @@ static void msg_scroll_up(void)
fill_msgsep, fill_msgsep, HL_ATTR(HLF_MSGSEP));
}
int nscroll = MIN(msg_scrollsize()+1, Rows);
- ui_call_set_scroll_region(Rows-nscroll, Rows-1, 0, Columns-1);
- screen_del_lines(Rows-nscroll, 0, 1, nscroll, NULL);
- ui_reset_scroll_region();
+ screen_del_lines(Rows-nscroll, 1, Rows, 0, Columns);
} else {
- screen_del_lines(0, 0, 1, (int)Rows, NULL);
+ screen_del_lines(0, 1, (int)Rows, 0, Columns);
}
}
@@ -2307,9 +2305,9 @@ static int do_more_prompt(int typed_char)
mp_last = msg_sb_start(mp_last->sb_prev);
}
- if (toscroll == -1 && screen_ins_lines(0, 0, 1,
- (int)Rows, NULL) == OK) {
- /* display line at top */
+ if (toscroll == -1
+ && screen_ins_lines(0, 1, (int)Rows, 0, (int)Columns) == OK) {
+ // display line at top
(void)disp_sb_line(0, mp);
} else {
/* redisplay all lines */