From 1ffd527c837fb2465c9659273bbe5447a1352db2 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Fri, 2 Sep 2022 17:39:49 +0100 Subject: refactor: migrate comment style (#20012) Done automatically using the following perl command: perl -pi -0777pe 's#\n\K */\*\n(.+?)\s*\*/\n#join("\n", map { $_ =~ s:^\s*\K \*://:; $_ } split("\n", $1)) . "\n"#sge' src/nvim/**/*.c Co-authored-by: zeertzjq Co-authored-by: zeertzjq --- src/nvim/eval.h | 52 +++++++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 27 deletions(-) (limited to 'src/nvim/eval.h') diff --git a/src/nvim/eval.h b/src/nvim/eval.h index b0cb5fd8c1..afebdf5acb 100644 --- a/src/nvim/eval.h +++ b/src/nvim/eval.h @@ -11,33 +11,31 @@ #define COPYID_INC 2 #define COPYID_MASK (~0x1) -/* - * Structure returned by get_lval() and used by set_var_lval(). - * For a plain name: - * "name" points to the variable name. - * "exp_name" is NULL. - * "tv" is NULL - * For a magic braces name: - * "name" points to the expanded variable name. - * "exp_name" is non-NULL, to be freed later. - * "tv" is NULL - * For an index in a list: - * "name" points to the (expanded) variable name. - * "exp_name" NULL or non-NULL, to be freed later. - * "tv" points to the (first) list item value - * "li" points to the (first) list item - * "range", "n1", "n2" and "empty2" indicate what items are used. - * For an existing Dict item: - * "name" points to the (expanded) variable name. - * "exp_name" NULL or non-NULL, to be freed later. - * "tv" points to the dict item value - * "newkey" is NULL - * For a non-existing Dict item: - * "name" points to the (expanded) variable name. - * "exp_name" NULL or non-NULL, to be freed later. - * "tv" points to the Dictionary typval_T - * "newkey" is the key for the new item. - */ +// Structure returned by get_lval() and used by set_var_lval(). +// For a plain name: +// "name" points to the variable name. +// "exp_name" is NULL. +// "tv" is NULL +// For a magic braces name: +// "name" points to the expanded variable name. +// "exp_name" is non-NULL, to be freed later. +// "tv" is NULL +// For an index in a list: +// "name" points to the (expanded) variable name. +// "exp_name" NULL or non-NULL, to be freed later. +// "tv" points to the (first) list item value +// "li" points to the (first) list item +// "range", "n1", "n2" and "empty2" indicate what items are used. +// For an existing Dict item: +// "name" points to the (expanded) variable name. +// "exp_name" NULL or non-NULL, to be freed later. +// "tv" points to the dict item value +// "newkey" is NULL +// For a non-existing Dict item: +// "name" points to the (expanded) variable name. +// "exp_name" NULL or non-NULL, to be freed later. +// "tv" points to the Dictionary typval_T +// "newkey" is the key for the new item. typedef struct lval_S { const char *ll_name; ///< Start of variable name (can be NULL). size_t ll_name_len; ///< Length of the .ll_name. -- cgit From 66360675cf4d091b7460e4a8e1435c13216c1929 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 11 Sep 2022 17:12:44 +0200 Subject: build: allow IWYU to fix includes for all .c files Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers. --- src/nvim/eval.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/nvim/eval.h') diff --git a/src/nvim/eval.h b/src/nvim/eval.h index afebdf5acb..61c1363d54 100644 --- a/src/nvim/eval.h +++ b/src/nvim/eval.h @@ -1,12 +1,17 @@ #ifndef NVIM_EVAL_H #define NVIM_EVAL_H +#include +#include + #include "nvim/buffer_defs.h" #include "nvim/channel.h" -#include "nvim/event/time.h" // For TimeWatcher -#include "nvim/ex_cmds_defs.h" // For exarg_T -#include "nvim/os/fileio.h" // For FileDescriptor -#include "nvim/os/stdpaths_defs.h" // For XDGVarType +#include "nvim/eval/typval_defs.h" +#include "nvim/event/time.h" +#include "nvim/ex_cmds_defs.h" +#include "nvim/hashtab.h" +#include "nvim/os/fileio.h" +#include "nvim/os/stdpaths_defs.h" #define COPYID_INC 2 #define COPYID_MASK (~0x1) -- cgit From 364b131f42509326c912c9b0fef5dfc94ed23b41 Mon Sep 17 00:00:00 2001 From: luukvbaal <31730729+luukvbaal@users.noreply.github.com> Date: Mon, 9 Jan 2023 18:12:06 +0100 Subject: feat(ui): add 'statuscolumn' option Problem: Unable to customize the column next to a window ('gutter'). Solution: Add 'statuscolumn' option that follows the 'statusline' syntax, allowing to customize the status column. Also supporting the %@ click execute function label. Adds new items @C and @s which will print the fold and sign columns. Line numbers and signs can be clicked, highlighted, aligned, transformed, margined etc. --- src/nvim/eval.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/nvim/eval.h') diff --git a/src/nvim/eval.h b/src/nvim/eval.h index 61c1363d54..d67414f12f 100644 --- a/src/nvim/eval.h +++ b/src/nvim/eval.h @@ -165,6 +165,8 @@ typedef enum { VV__NULL_DICT, // Dictionary with NULL value. For test purposes only. VV__NULL_BLOB, // Blob with NULL value. For test purposes only. VV_LUA, + VV_RELNUM, + VV_WRAP, } VimVarIndex; /// All recognized msgpack types -- cgit From 85111ca0f4916ade5caa4e1ca836d615afdba6f8 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Thu, 12 Jan 2023 10:40:53 +0100 Subject: fix(column)!: ensure 'statuscolumn' works with virtual and wrapped lines Problem: The `'statuscolumn'` was not re-evaluated for wrapped lines, when preceded by virtual/filler lines. There was also no way to distinguish virtual and wrapped lines in the status column. Solution: Make sure to rebuild the statuscolumn, and replace variable `v:wrap` with `v:virtnum`. `v:virtnum` is negative when drawing virtual lines, zero when drawing the actual buffer line, and positive when drawing the wrapped part of a buffer line. --- src/nvim/eval.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/eval.h') diff --git a/src/nvim/eval.h b/src/nvim/eval.h index d67414f12f..86bc76e793 100644 --- a/src/nvim/eval.h +++ b/src/nvim/eval.h @@ -166,7 +166,7 @@ typedef enum { VV__NULL_BLOB, // Blob with NULL value. For test purposes only. VV_LUA, VV_RELNUM, - VV_WRAP, + VV_VIRTNUM, } VimVarIndex; /// All recognized msgpack types -- cgit