aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer_defs.h
diff options
context:
space:
mode:
authorRom Grk <romgrk.cc@gmail.com>2020-10-26 18:48:39 -0400
committerRom Grk <romgrk.cc@gmail.com>2020-10-31 19:54:06 -0400
commit10bf69a43e8f58b0d49bc6253e4e2758060670a8 (patch)
tree421994bbf735a3477bec04cde91af2157a0ac10b /src/nvim/buffer_defs.h
parentb6897ebc0c623d0a74c221c3030c7eaf17b7e151 (diff)
downloadrneovim-10bf69a43e8f58b0d49bc6253e4e2758060670a8.tar.gz
rneovim-10bf69a43e8f58b0d49bc6253e4e2758060670a8.tar.bz2
rneovim-10bf69a43e8f58b0d49bc6253e4e2758060670a8.zip
vim-patch:8.2.1909: number of status line items is limited to 80
Problem: Number of status line items is limited to 80. Solution: Dynamically allocate the arrays. (Rom Grk, closes vim/vim#7181) https://github.com/vim/vim/commit/8133cc6bf454eb90bb0868f7cf806fce5c0c9fe6 The members of stl_item_T have not been prefixed with stl_ contrary to the vim patch because the amount of stl_ prefixes on single lines of code in that region was hurtful to readability.
Diffstat (limited to 'src/nvim/buffer_defs.h')
-rw-r--r--src/nvim/buffer_defs.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h
index 8e855cb644..9d4a6ecbea 100644
--- a/src/nvim/buffer_defs.h
+++ b/src/nvim/buffer_defs.h
@@ -361,14 +361,36 @@ struct mapblock {
sctx_T m_script_ctx; // SCTX where map was defined
};
-/*
- * Used for highlighting in the status line.
- */
+/// Used for highlighting in the status line.
+typedef struct stl_hlrec stl_hlrec_t;
struct stl_hlrec {
char_u *start;
int userhl; // 0: no HL, 1-9: User HL, < 0 for syn ID
};
+/// Used for building the status line.
+typedef struct stl_item stl_item_t;
+struct stl_item {
+ // Where the item starts in the status line output buffer
+ char_u *start;
+ // Function to run for ClickFunc items.
+ char *cmd;
+ // The minimum width of the item
+ int minwid;
+ // The maximum width of the item
+ int maxwid;
+ enum {
+ Normal,
+ Empty,
+ Group,
+ Separate,
+ Highlight,
+ TabPage,
+ ClickFunc,
+ Trunc
+ } type;
+};
+
// values for b_syn_spell: what to do with toplevel text
#define SYNSPL_DEFAULT 0 // spell check if @Spell not defined
#define SYNSPL_TOP 1 // spell check toplevel text