diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-09-17 23:03:31 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-09-17 23:03:31 +0200 |
commit | 1b9645de3c05f37b5c30e78f999351b0cf486ade (patch) | |
tree | 4041a73d7fd4ab444372919e99962587a689388a /src/ui.c | |
parent | dde403c2d8f3dabe6fefa7b526958b49a8f2e6e9 (diff) | |
download | vim-git-1b9645de3c05f37b5c30e78f999351b0cf486ade.tar.gz |
patch 8.0.1123: cannot define a toolbar for a windowv8.0.1123
Problem: Cannot define a toolbar for a window.
Solution: Add a window-local toolbar.
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -2657,7 +2657,7 @@ retnomove: } #if defined(FEAT_CMDWIN) && defined(FEAT_CLIPBOARD) /* Continue a modeless selection in another window. */ - if (cmdwin_type != 0 && row < W_WINROW(curwin)) + if (cmdwin_type != 0 && row < curwin->w_winrow) return IN_OTHER_WIN; #endif return IN_BUFFER; @@ -2692,6 +2692,17 @@ retnomove: if (wp == NULL) return IN_UNKNOWN; dragwin = NULL; + +#ifdef FEAT_MENU + 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; + } +#endif + /* * winpos and height may change in win_enter()! */ @@ -2829,7 +2840,7 @@ retnomove: #if defined(FEAT_CMDWIN) && defined(FEAT_CLIPBOARD) /* Continue a modeless selection in another window. */ - if (cmdwin_type != 0 && row < W_WINROW(curwin)) + if (cmdwin_type != 0 && row < curwin->w_winrow) return IN_OTHER_WIN; #endif @@ -3117,7 +3128,12 @@ mouse_find_win(int *rowp, int *colp UNUSED) * exist. */ FOR_ALL_WINDOWS(wp) if (wp == fp->fr_win) + { +#ifdef FEAT_MENU + *rowp -= wp->w_winbar_height; +#endif return wp; + } return NULL; } |