diff options
author | Will Hopkins <willothyh@gmail.com> | 2024-01-31 19:43:35 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-01 11:43:35 +0800 |
commit | 6bba4becedaea5a330c0c9d9427fb495e8092dac (patch) | |
tree | 989ada1e26430843b6b855e8189afc29b2b69267 /src/nvim/buffer_defs.h | |
parent | 8fa67fdae539a13cf78621ab5a628da1fd745be2 (diff) | |
download | rneovim-6bba4becedaea5a330c0c9d9427fb495e8092dac.tar.gz rneovim-6bba4becedaea5a330c0c9d9427fb495e8092dac.tar.bz2 rneovim-6bba4becedaea5a330c0c9d9427fb495e8092dac.zip |
feat(api): make nvim_open_win support non-floating windows (#25550)
Adds support to `nvim_open_win` and `nvim_win_set_config` for creating
and manipulating split (non-floating) windows.
Diffstat (limited to 'src/nvim/buffer_defs.h')
-rw-r--r-- | src/nvim/buffer_defs.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h index 24f97dd92c..ea014c3918 100644 --- a/src/nvim/buffer_defs.h +++ b/src/nvim/buffer_defs.h @@ -889,6 +889,14 @@ typedef enum { kFloatRelativeMouse = 3, } FloatRelative; +/// Keep in sync with win_split_str[] in nvim_win_get_config() (api/win_config.c) +typedef enum { + kWinSplitLeft = 0, + kWinSplitRight = 1, + kWinSplitAbove = 2, + kWinSplitBelow = 3, +} WinSplit; + typedef enum { kWinStyleUnused = 0, kWinStyleMinimal, /// Minimal UI: no number column, eob markers, etc @@ -914,6 +922,7 @@ typedef struct { FloatRelative relative; bool external; bool focusable; + WinSplit split; int zindex; WinStyle style; bool border; @@ -939,6 +948,7 @@ typedef struct { .row = 0, .col = 0, .anchor = 0, \ .relative = 0, .external = false, \ .focusable = true, \ + .split = 0, \ .zindex = kZIndexFloatDefault, \ .style = kWinStyleUnused, \ .noautocmd = false, \ |