vim-patch:8.0.1123: cannot define a toolbar for a window

Problem:    Cannot define a toolbar for a window.
Solution:   Add a window-local toolbar.
1b9645de3c

"WinBar" code in "screen.c" was not ported.

Fix https://github.com/neovim/neovim/issues/11513#issuecomment-562012827
This commit is contained in:
Jan Edmund Lazo
2020-03-13 22:05:05 -04:00
parent 5f41717838
commit 64b61d49c2
7 changed files with 295 additions and 161 deletions

View File

@@ -134,6 +134,14 @@ retnomove:
}
fdc = win_fdccol_count(wp);
dragwin = NULL;
if (row == -1) {
// A click in the window toolbar does not enter another window or
// change Visual highlighting.
winbar_click(wp, col);
return IN_OTHER_WIN;
}
// winpos and height may change in win_enter()!
if (grid == DEFAULT_GRID_HANDLE && row >= wp->w_height) {
// In (or below) status line
@@ -471,6 +479,7 @@ 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;
}
}