aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mouse.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-11-20 20:17:10 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-11-20 20:27:12 -0500
commit2a5307202b02d47e26c4430a47db7a4cad422862 (patch)
treec234b85b22930f1b94c09cbefcff29c884e45d35 /src/nvim/mouse.c
parent172d5b65616b37b84ba71dd421d8a1314bd53288 (diff)
downloadrneovim-2a5307202b02d47e26c4430a47db7a4cad422862.tar.gz
rneovim-2a5307202b02d47e26c4430a47db7a4cad422862.tar.bz2
rneovim-2a5307202b02d47e26c4430a47db7a4cad422862.zip
menu: remove winbar code
No unmerged Vim patch, applicable to Neovim, depend on WinBar feature. It was merged only for merging Vim patches. It is currently useless in Neovim. Remove it to avoid rendering issues. Close https://github.com/neovim/neovim/issues/12689
Diffstat (limited to 'src/nvim/mouse.c')
-rw-r--r--src/nvim/mouse.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/nvim/mouse.c b/src/nvim/mouse.c
index cff88de00b..f05dade73f 100644
--- a/src/nvim/mouse.c
+++ b/src/nvim/mouse.c
@@ -60,7 +60,6 @@ int jump_to_mouse(int flags,
{
static int on_status_line = 0; // #lines below bottom of window
static int on_sep_line = 0; // on separator right of window
- static bool in_winbar = false;
static int prev_row = -1;
static int prev_col = -1;
static win_T *dragwin = NULL; // window being dragged
@@ -101,18 +100,6 @@ retnomove:
if (on_sep_line) {
return IN_SEP_LINE;
}
- if (in_winbar) {
- // A quick second click may arrive as a double-click, but we use it
- // as a second click in the WinBar.
- if ((mod_mask & MOD_MASK_MULTI_CLICK) && !(flags & MOUSE_RELEASED)) {
- wp = mouse_find_win(&grid, &row, &col);
- if (wp == NULL) {
- return IN_UNKNOWN;
- }
- winbar_click(wp, col);
- }
- return IN_OTHER_WIN | MOUSE_WINBAR;
- }
if (flags & MOUSE_MAY_STOP_VIS) {
end_visual_mode();
redraw_curbuf_later(INVERTED); // delete the inversion
@@ -142,13 +129,8 @@ retnomove:
dragwin = NULL;
if (row == -1) {
- // A click in the window toolbar does not enter another window or
- // change Visual highlighting.
- winbar_click(wp, col);
- in_winbar = true;
- return IN_OTHER_WIN | MOUSE_WINBAR;
+ return IN_OTHER_WIN;
}
- in_winbar = false;
// winpos and height may change in win_enter()!
if (grid == DEFAULT_GRID_HANDLE && row >= wp->w_height) {
@@ -239,9 +221,6 @@ retnomove:
did_drag |= count;
}
return IN_SEP_LINE; // Cursor didn't move
- } else if (in_winbar) {
- // After a click on the window toolbar don't start Visual mode.
- return IN_OTHER_WIN | MOUSE_WINBAR;
} else {
// keep_window_focus must be true
// before moving the cursor for a left click, stop Visual mode
@@ -503,7 +482,6 @@ win_T *mouse_find_win(int *gridp, int *rowp, int *colp)
// exist.
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
if (wp == fp->fr_win) {
- *rowp -= wp->w_winbar_height;
return wp;
}
}