aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/normal.c
diff options
context:
space:
mode:
authorFamiu Haque <famiuhaque@protonmail.com>2022-05-13 20:47:11 +0600
committerFamiu Haque <famiuhaque@protonmail.com>2022-05-18 09:27:08 +0600
commite1bdb2a258cbe6c5cb981acc6bac82cd9e7706fb (patch)
treed892e10e8e922e71ce822e7c6a5c41fad1dd73d1 /src/nvim/normal.c
parentb9b5577d6d8e07d1e39020c8fc05f817f2e81c66 (diff)
downloadrneovim-e1bdb2a258cbe6c5cb981acc6bac82cd9e7706fb.tar.gz
rneovim-e1bdb2a258cbe6c5cb981acc6bac82cd9e7706fb.tar.bz2
rneovim-e1bdb2a258cbe6c5cb981acc6bac82cd9e7706fb.zip
feat(ui): add `'winbar'`
Adds support for a bar at the top of each window, enabled through the `'winbar'` option. Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r--src/nvim/normal.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 2826b7dad1..1692970a97 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -1280,7 +1280,8 @@ static void normal_redraw(NormalState *s)
validate_cursor();
if (VIsual_active) {
- update_curbuf(INVERTED); // update inverted part
+ redraw_curbuf_later(INVERTED); // update inverted part
+ update_screen(INVERTED);
} else if (must_redraw) {
update_screen(0);
} else if (redraw_cmdline || clear_cmdline) {
@@ -1850,6 +1851,11 @@ bool do_mouse(oparg_T *oap, int c, int dir, long count, bool fixindent)
oap == NULL ? NULL : &(oap->inclusive),
which_button);
+ // A click in the window bar has no side effects.
+ if (jump_flags & MOUSE_WINBAR) {
+ return false;
+ }
+
moved = (jump_flags & CURSOR_MOVED);
in_status_line = (jump_flags & IN_STATUS_LINE);
in_sep_line = (jump_flags & IN_SEP_LINE);