diff options
author | Raphael <glephunter@gmail.com> | 2022-11-06 18:59:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-06 11:59:43 +0100 |
commit | 1af4bd04f9ad157edbfea30642250e854c5cb5d2 (patch) | |
tree | 96d28408eec2ad387965065f771427179c2b7f8c /src/nvim/buffer_defs.h | |
parent | a79d28e4d7939c13f38cf4ce63ff240011bca96d (diff) | |
download | rneovim-1af4bd04f9ad157edbfea30642250e854c5cb5d2.tar.gz rneovim-1af4bd04f9ad157edbfea30642250e854c5cb5d2.tar.bz2 rneovim-1af4bd04f9ad157edbfea30642250e854c5cb5d2.zip |
feat(ui): add support to display a title in the border of a float (#20184)
add "title" and "title_pos" keys to win config dict.
Diffstat (limited to 'src/nvim/buffer_defs.h')
-rw-r--r-- | src/nvim/buffer_defs.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h index 4e46a1aef2..2b42289858 100644 --- a/src/nvim/buffer_defs.h +++ b/src/nvim/buffer_defs.h @@ -44,6 +44,8 @@ typedef struct { #include "klib/kvec.h" // for marktree #include "nvim/marktree.h" +// for float window title +#include "nvim/extmark_defs.h" #define GETFILE_SUCCESS(x) ((x) <= 0) #define MODIFIABLE(buf) (buf->b_p_ma) @@ -1048,6 +1050,12 @@ typedef enum { kWinStyleMinimal, /// Minimal UI: no number column, eob markers, etc } WinStyle; +typedef enum { + kAlignLeft = 0, + kAlignCenter = 1, + kAlignRight = 2, +} AlignTextPos; + typedef struct { Window window; lpos_T bufpos; @@ -1060,10 +1068,14 @@ typedef struct { int zindex; WinStyle style; bool border; + bool title; bool shadow; schar_T border_chars[8]; int border_hl_ids[8]; int border_attr[8]; + AlignTextPos title_pos; + VirtText title_chunks; + int title_width; bool noautocmd; } FloatConfig; |