0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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.
This commit is contained in:
Bram Moolenaar
2017-09-17 23:03:31 +02:00
parent dde403c2d8
commit 1b9645de3c
20 changed files with 679 additions and 238 deletions

View File

@@ -70,6 +70,10 @@ typedef int scid_T; /* script ID */
typedef struct file_buffer buf_T; /* forward declaration */
typedef struct terminal_S term_T;
#ifdef FEAT_MENU
typedef struct VimMenu vimmenu_T;
#endif
/*
* Reference to a buffer that stores the value of buf_free_count.
* bufref_valid() only needs to check "buf" when the count differs.
@@ -2611,6 +2615,14 @@ struct matchitem
#endif
};
#ifdef FEAT_MENU
typedef struct {
int wb_startcol;
int wb_endcol;
vimmenu_T *wb_menu;
} winbar_item_T;
#endif
/*
* Structure which contains all information that belongs to a window
*
@@ -2686,7 +2698,7 @@ struct window_S
*/
int w_winrow; /* first row of window in screen */
int w_height; /* number of rows in window, excluding
status/command line(s) */
status/command/winbar line(s) */
int w_status_height; /* number of status lines (0 or 1) */
int w_wincol; /* Leftmost column of window in screen.
use W_WINCOL() */
@@ -2798,6 +2810,12 @@ struct window_S
char_u *w_localdir; /* absolute path of local directory or
NULL */
#ifdef FEAT_MENU
vimmenu_T *w_winbar; /* The root of the WinBar menu hierarchy. */
winbar_item_T *w_winbar_items; /* list of items in the WinBar */
int w_winbar_height; /* 1 if there is a window toolbar */
#endif
/*
* Options local to a window.
* They are local because they influence the layout of the window or
@@ -3064,8 +3082,6 @@ typedef struct cursor_entry
/* Start a menu name with this to not include it on the main menu bar */
#define MNU_HIDDEN_CHAR ']'
typedef struct VimMenu vimmenu_T;
struct VimMenu
{
int modes; /* Which modes is this menu visible for? */