From 5ac34cf55db2b00c044fa95f75766dd89dd36ba9 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 26 Jan 2023 09:30:26 +0800 Subject: refactor(intro): avoid Coverity warning (#22000) refactor(intro): avoid coverity warning Problem: Coverity warns about overwriting "mesg" leaking memory. Solution: Make it clear that "mesg" will not be overwritten. --- src/nvim/version.c | 40 +++++++++++++++------------------------- 1 file changed, 15 insertions(+), 25 deletions(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index 417e5116a5..11f1d6695e 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -2785,13 +2785,6 @@ void maybe_intro_message(void) /// @param colon true for ":intro" void intro_message(int colon) { - int i; - long row; - long blanklines; - int sponsor; - char *p; - char *mesg; - int mesg_size; static char *(lines[]) = { N_(NVIM_VERSION_LONG), "", @@ -2813,7 +2806,7 @@ void intro_message(int colon) size_t lines_size = ARRAY_SIZE(lines); assert(lines_size <= LONG_MAX); - blanklines = Rows - ((long)lines_size - 1L); + long blanklines = Rows - ((long)lines_size - 1L); // Don't overwrite a statusline. Depends on 'cmdheight'. if (p_ls > 1) { @@ -2826,17 +2819,17 @@ void intro_message(int colon) // Show the sponsor and register message one out of four times, the Uganda // message two out of four times. - sponsor = (int)time(NULL); + int sponsor = (int)time(NULL); sponsor = ((sponsor & 2) == 0) - ((sponsor & 4) == 0); // start displaying the message lines after half of the blank lines - row = blanklines / 2; + long row = blanklines / 2; if (((row >= 2) && (Columns >= 50)) || colon) { - for (i = 0; i < (int)ARRAY_SIZE(lines); i++) { - p = lines[i]; - mesg = NULL; - mesg_size = 0; + for (int i = 0; i < (int)ARRAY_SIZE(lines); i++) { + char *p = lines[i]; + char *mesg = NULL; + int mesg_size = 0; if (strstr(p, "news") != NULL) { p = _(p); @@ -2846,18 +2839,15 @@ void intro_message(int colon) mesg = xmallocz((size_t)mesg_size); snprintf(mesg, (size_t)mesg_size + 1, p, STR(NVIM_VERSION_MAJOR), STR(NVIM_VERSION_MINOR)); - } - - if (sponsor != 0) { + } else if (sponsor != 0) { if (strstr(p, "children") != NULL) { - mesg = sponsor < 0 - ? _("Sponsor Vim development!") - : _("Become a registered Vim user!"); - } - if (strstr(p, "iccf") != NULL) { - mesg = sponsor < 0 - ? _("type :help sponsor for information ") - : _("type :help register for information "); + p = sponsor < 0 + ? N_("Sponsor Vim development!") + : N_("Become a registered Vim user!"); + } else if (strstr(p, "iccf") != NULL) { + p = sponsor < 0 + ? N_("type :help sponsor for information ") + : N_("type :help register for information "); } } -- cgit From ecc1595c7b81987ca9d6265d1e08ef37a05c95bf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 2 Feb 2023 08:07:11 +0800 Subject: version.c: update [skip ci] (#21306) Co-authored-by: marvim N/A patches: vim-patch:9.0.1272: typo in pattern for filetype detection --- src/nvim/version.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index 11f1d6695e..3324ac2a94 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -795,7 +795,7 @@ static const int included_patches[] = { 1702, 1701, // 1700, - // 1699, + 1699, 1698, 1697, 1696, @@ -1361,7 +1361,7 @@ static const int included_patches[] = { // 1136, 1135, 1134, - // 1133, + 1133, 1132, 1131, 1130, @@ -1674,7 +1674,7 @@ static const int included_patches[] = { 823, 822, 821, - // 820, + 820, 819, 818, 817, -- cgit From db849517c613733fb2959d43e6d10d5d98d5033d Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 18 Feb 2023 19:06:38 +0100 Subject: fix: remove "Features" section from --version/:version (#22315) Neovim doesn not have any optional features. --- src/nvim/version.c | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index 3324ac2a94..8ae43cb488 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -57,17 +57,6 @@ char *version_cflags = "Compilation: " NVIM_VERSION_CFLAGS; # include "version.c.generated.h" #endif -static char *features[] = { -#ifdef HAVE_ACL - "+acl", -#else - "-acl", -#endif - - "+tui", - NULL -}; - // clang-format off static const int included_patches[] = { 2424, @@ -2619,21 +2608,6 @@ static void version_msg(char *s) version_msg_wrap(s, false); } -/// List all features. -/// This does not use list_in_columns (as in Vim), because there are only a -/// few, and we do not start at a new line. -static void list_features(void) -{ - version_msg(_("\n\nFeatures: ")); - for (int i = 0; features[i] != NULL; i++) { - version_msg(features[i]); - if (features[i + 1] != NULL) { - version_msg(" "); - } - } - version_msg("\nSee \":help feature-compile\"\n\n"); -} - /// List string items nicely aligned in columns. /// When "size" is < 0 then the last entry is marked with NULL. /// The entry with index "current" is inclosed in []. @@ -2742,7 +2716,7 @@ void list_version(void) } #endif // ifdef HAVE_PATHDEF - list_features(); + version_msg("\n\n"); #ifdef SYS_VIMRC_FILE version_msg(_(" system vimrc file: \"")); -- cgit From 458299df796572c8b7cbb6b6af03f4642cf03215 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 18 Feb 2023 20:10:00 +0100 Subject: fix: remove "Compiled by:" from :version/--version (#22316) The :version output is already crowded as is, the last thing we need is extraneous messages about who compiled it. --- src/nvim/version.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index 8ae43cb488..a9d72bf017 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -2699,23 +2699,6 @@ void list_version(void) msg(version_cflags); #endif -#ifdef HAVE_PATHDEF - - if ((*compiled_user != NUL) || (*compiled_sys != NUL)) { - msg_puts(_("\nCompiled ")); - - if (*compiled_user != NUL) { - msg_puts(_("by ")); - msg_puts((const char *)compiled_user); - } - - if (*compiled_sys != NUL) { - msg_puts("@"); - msg_puts((const char *)compiled_sys); - } - } -#endif // ifdef HAVE_PATHDEF - version_msg("\n\n"); #ifdef SYS_VIMRC_FILE -- cgit From 2d2ed4f6fdcb9c876a5635a02ccb48ff0cabddfa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 22 Apr 2023 11:24:28 +0800 Subject: version.c: update [skip ci] (#22095) Co-authored-by: marvim --- src/nvim/version.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index a9d72bf017..9dfc0c880d 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -389,7 +389,7 @@ static const int included_patches[] = { 2097, 2096, 2095, - // 2094, + 2094, // 2093, // 2092, 2091, @@ -656,7 +656,7 @@ static const int included_patches[] = { 1830, 1829, 1828, - // 1827, + 1827, 1826, 1825, 1824, -- cgit From fa20c12ba358066858d1d2cd20d21316fe4b467b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 30 Apr 2023 12:40:01 +0800 Subject: version.c: update [skip ci] (#23388) Co-authored-by: marvim --- src/nvim/version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index 9dfc0c880d..c0e0ceef55 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -335,7 +335,7 @@ static const int included_patches[] = { 2151, 2150, 2149, - // 2148, + 2148, 2147, // 2146, 2145, -- cgit From 199a990c9e4e36f72ddcd041af28185f2ee4b4d6 Mon Sep 17 00:00:00 2001 From: treatybreaker Date: Sun, 11 Jun 2023 16:57:23 -0500 Subject: feat: report "build" in vim.version() #23925 Problem: Nvim version string typically has a "build" component but vim.version() doesn't report it. Solution: Add the "build" field to vim.version(). Closes #23863 --- src/nvim/version.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index c0e0ceef55..b9fa7799a6 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -2560,6 +2560,11 @@ Dictionary version_dict(void) PUT(d, "major", INTEGER_OBJ(NVIM_VERSION_MAJOR)); PUT(d, "minor", INTEGER_OBJ(NVIM_VERSION_MINOR)); PUT(d, "patch", INTEGER_OBJ(NVIM_VERSION_PATCH)); +#ifndef NVIM_VERSION_BUILD + PUT(d, "build", NIL); +#else + PUT(d, "build", CSTR_AS_OBJ(NVIM_VERSION_BUILD)); +#endif PUT(d, "prerelease", BOOLEAN_OBJ(NVIM_VERSION_PRERELEASE[0] != '\0')); PUT(d, "api_level", INTEGER_OBJ(NVIM_API_LEVEL)); PUT(d, "api_compatible", INTEGER_OBJ(NVIM_API_LEVEL_COMPAT)); -- cgit From 43ded8d3584477ab14731486cfb0e86534f2b2dc Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 1 Jul 2023 03:45:45 -0700 Subject: feat(version): unverbose ":version", ":verbose version" #24195 Problem: `nvim -v` and `:version` prints system vimrc, fallback files, and compilation info by default, which most people don't care about and just clutters up the output. Solution: Omit extra info unless 'verbose' is set. --- src/nvim/version.c | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index b9fa7799a6..95e275bceb 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -2700,33 +2700,39 @@ void list_version(void) msg(longVersion); msg(version_buildtype); list_lua_version(); + + if (p_verbose > 0) { #ifndef NDEBUG - msg(version_cflags); + msg(version_cflags); #endif - - version_msg("\n\n"); + version_msg("\n\n"); #ifdef SYS_VIMRC_FILE - version_msg(_(" system vimrc file: \"")); - version_msg(SYS_VIMRC_FILE); - version_msg("\"\n"); -#endif // ifdef SYS_VIMRC_FILE -#ifdef HAVE_PATHDEF - - if (*default_vim_dir != NUL) { - version_msg(_(" fall-back for $VIM: \"")); - version_msg(default_vim_dir); + version_msg(_(" system vimrc file: \"")); + version_msg(SYS_VIMRC_FILE); version_msg("\"\n"); - } +#endif - if (*default_vimruntime_dir != NUL) { - version_msg(_(" f-b for $VIMRUNTIME: \"")); - version_msg(default_vimruntime_dir); - version_msg("\"\n"); +#ifdef HAVE_PATHDEF + if (*default_vim_dir != NUL) { + version_msg(_(" fall-back for $VIM: \"")); + version_msg(default_vim_dir); + version_msg("\"\n"); + } + + if (*default_vimruntime_dir != NUL) { + version_msg(_(" f-b for $VIMRUNTIME: \"")); + version_msg(default_vimruntime_dir); + version_msg("\"\n"); + } +#endif } -#endif // ifdef HAVE_PATHDEF - version_msg("\nRun :checkhealth for more info"); + version_msg(p_verbose > 0 + ? "\nRun :checkhealth for more info" + : (starting + ? "\nRun \"nvim -V1 -v\" for more info" + : "\nRun \":verbose version\" for more info")); } /// Show the intro message when not editing a file. -- cgit From 898ef1835dbebbee4da3e95ef2d80349786cac32 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 22 Aug 2023 11:15:26 +0800 Subject: version.c: update [skip ci] (#24830) Co-authored-by: marvim --- src/nvim/version.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index 95e275bceb..b6861142cc 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -80,7 +80,7 @@ static const int included_patches[] = { 2406, 2405, 2404, - // 2403, + 2403, 2402, 2401, 2400, @@ -384,7 +384,7 @@ static const int included_patches[] = { 2102, 2101, 2100, - // 2099, + 2099, 2098, 2097, 2096, @@ -413,15 +413,15 @@ static const int included_patches[] = { 2073, 2072, // 2071, - // 2070, - // 2069, - // 2068, - // 2067, - // 2066, + 2070, + 2069, + 2068, + 2067, + 2066, 2065, 2064, 2063, - // 2062, + 2062, 2061, 2060, 2059, @@ -430,16 +430,16 @@ static const int included_patches[] = { 2056, 2055, 2054, - // 2053, + 2053, 2052, 2051, 2050, 2049, - // 2048, - // 2047, - // 2046, + 2048, + 2047, + 2046, 2045, - // 2044, + 2044, 2043, 2042, 2041, -- cgit From 3a7cb72dcbe4aaaed47999ab5afaf3d1cb8d4df8 Mon Sep 17 00:00:00 2001 From: bfredl Date: Wed, 20 Sep 2023 13:42:37 +0200 Subject: refactor(grid): properly namespace and separate stateful grid functions This is a step in an ongoing refactor where the "grid_puts" and "grid_put_linebuf" code paths will share more of the implementation (in particular for delta calculation, doublewidth and 'arabicshape' handling). But it also makes sense by its own as a cleanup, and is thus committed separately. Before this change many of the low level grid functions grid_puts, grid_fill etc could both be used in a standalone fashion but also as part of a batched line update which would be finally transmitted as a single grid_line call (via ui_line() ). This was initially useful to quickly refactor pre-existing vim code to use batched logic safely. However, this pattern is not really helpful for maintainable and newly written code, where the "grid" and "row" arguments are just needlessly repeated. This simplifies these calls to just use grid and row as specified in the initial grid_line_start(grid, row) call. This also makes the intent clear whether any grid_puts() call is actually part of a batch or not, which is better in the long run when more things get refactored to use effective (properly batched) updates. --- src/nvim/version.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index b6861142cc..0744a601bb 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -2837,12 +2837,6 @@ void intro_message(int colon) } } } - - // Make the wait-return message appear just below the text. - if (colon) { - assert(row <= INT_MAX); - msg_row = (int)row; - } } static void do_intro_line(long row, char *mesg, int attr) @@ -2871,8 +2865,8 @@ static void do_intro_line(long row, char *mesg, int attr) l += utfc_ptr2len(p + l) - 1; } assert(row <= INT_MAX && col <= INT_MAX); - grid_puts_len(&default_grid, p, l, (int)row, (int)col, - *p == '<' ? HL_ATTR(HLF_8) : attr); + grid_puts(&default_grid, p, l, (int)row, (int)col, + *p == '<' ? HL_ATTR(HLF_8) : attr); col += clen; } } -- cgit From b85f1dafc7c0a19704135617454f1c66f41202c1 Mon Sep 17 00:00:00 2001 From: bfredl Date: Wed, 27 Sep 2023 22:21:17 +0200 Subject: refactor(messages): fold msg_attr into msg problem: there are too many different functions in message.c solution: fold some of the functions into themselves --- src/nvim/version.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index 0744a601bb..437434f92a 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -2691,19 +2691,19 @@ void list_lua_version(void) Object ret = nlua_exec(cstr_as_string(code), (Array)ARRAY_DICT_INIT, &err); assert(!ERROR_SET(&err)); assert(ret.type == kObjectTypeString); - msg(ret.data.string.data); + msg(ret.data.string.data, 0); api_free_object(ret); } void list_version(void) { - msg(longVersion); - msg(version_buildtype); + msg(longVersion, 0); + msg(version_buildtype, 0); list_lua_version(); if (p_verbose > 0) { #ifndef NDEBUG - msg(version_cflags); + msg(version_cflags, 0); #endif version_msg("\n\n"); -- cgit From cf8b2c0e74fd5e723b0c15c2ce84e6900fd322d3 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 30 Sep 2023 12:05:28 +0800 Subject: build(iwyu): add a few more _defs.h mappings (#25435) --- src/nvim/version.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index 437434f92a..35f8fe5373 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -9,11 +9,11 @@ #include #include #include +#include #include #include #include -#include "auto/config.h" #include "auto/versiondef.h" // version info generated by the build system #include "auto/versiondef_git.h" #include "nvim/api/private/defs.h" @@ -32,7 +32,6 @@ #include "nvim/memory.h" #include "nvim/message.h" #include "nvim/option_defs.h" -#include "nvim/os/os_defs.h" #include "nvim/strings.h" #include "nvim/version.h" #include "nvim/vim.h" -- cgit From dc6d0d2daf69e2fdadda81feb97906dbc962a239 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 30 Sep 2023 14:41:34 +0800 Subject: refactor: reorganize option header files (#25437) - Move vimoption_T to option.h - option_defs.h is for option-related types - option_vars.h corresponds to Vim's option.h - option_defs.h and option_vars.h don't include each other --- src/nvim/version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index 35f8fe5373..20bbcb2f8a 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -31,7 +31,7 @@ #include "nvim/mbyte.h" #include "nvim/memory.h" #include "nvim/message.h" -#include "nvim/option_defs.h" +#include "nvim/option_vars.h" #include "nvim/strings.h" #include "nvim/version.h" #include "nvim/vim.h" -- cgit From a58bb215449cee65b965b9094e9e996ddfe78315 Mon Sep 17 00:00:00 2001 From: bfredl Date: Thu, 5 Oct 2023 14:44:13 +0200 Subject: refactor(grid): get rid of unbatched grid_puts and grid_putchar This finalizes the long running refactor from the old TUI-focused grid implementation where text-drawing cursor was not separated from the visible cursor. Still, the pattern of setting cursor position together with updating a line was convenient. Introduce grid_line_cursor_goto() to still allow this but now being explicit about it. Only having batched drawing functions makes code involving drawing a bit longer. But it is better to be explicit, and this highlights cases where multiple small redraws can be grouped together. This was the case for most of the changed places (messages, lastline, and :intro) --- src/nvim/version.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index 20bbcb2f8a..c3bfad4706 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -2827,7 +2827,7 @@ void intro_message(int colon) } if (*mesg != NUL) { - do_intro_line(row, mesg, 0); + do_intro_line((int)row, mesg, 0); } row++; @@ -2838,14 +2838,13 @@ void intro_message(int colon) } } -static void do_intro_line(long row, char *mesg, int attr) +static void do_intro_line(int row, char *mesg, int attr) { char *p; int l; - int clen; // Center the message horizontally. - long col = vim_strsize(mesg); + int col = vim_strsize(mesg); col = (Columns - col) / 2; @@ -2853,21 +2852,18 @@ static void do_intro_line(long row, char *mesg, int attr) col = 0; } + grid_line_start(&default_grid, row); // Split up in parts to highlight <> items differently. for (p = mesg; *p != NUL; p += l) { - clen = 0; - for (l = 0; p[l] != NUL && (l == 0 || (p[l] != '<' && p[l - 1] != '>')); l++) { - clen += ptr2cells(p + l); l += utfc_ptr2len(p + l) - 1; } assert(row <= INT_MAX && col <= INT_MAX); - grid_puts(&default_grid, p, l, (int)row, (int)col, - *p == '<' ? HL_ATTR(HLF_8) : attr); - col += clen; + col += grid_line_puts(col, p, l, *p == '<' ? HL_ATTR(HLF_8) : attr); } + grid_line_flush(); } /// ":intro": clear screen, display intro screen and wait for return. -- cgit From 8e932480f61d6101bf8bea1abc07ed93826221fd Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 29 Sep 2023 14:58:48 +0200 Subject: refactor: the long goodbye long is 32 bits on windows, while it is 64 bits on other architectures. This makes the type suboptimal for a codebase meant to be cross-platform. Replace it with more appropriate integer types. --- src/nvim/version.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index c3bfad4706..ddfadeb44e 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -2773,7 +2773,7 @@ void intro_message(int colon) size_t lines_size = ARRAY_SIZE(lines); assert(lines_size <= LONG_MAX); - long blanklines = Rows - ((long)lines_size - 1L); + int blanklines = Rows - ((int)lines_size - 1); // Don't overwrite a statusline. Depends on 'cmdheight'. if (p_ls > 1) { @@ -2790,7 +2790,7 @@ void intro_message(int colon) sponsor = ((sponsor & 2) == 0) - ((sponsor & 4) == 0); // start displaying the message lines after half of the blank lines - long row = blanklines / 2; + int row = blanklines / 2; if (((row >= 2) && (Columns >= 50)) || colon) { for (int i = 0; i < (int)ARRAY_SIZE(lines); i++) { @@ -2827,7 +2827,7 @@ void intro_message(int colon) } if (*mesg != NUL) { - do_intro_line((int)row, mesg, 0); + do_intro_line(row, mesg, 0); } row++; -- cgit From 353a4be7e84fdc101318215bdcc8a7e780d737fe Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 12 Nov 2023 13:13:58 +0100 Subject: build: remove PVS We already have an extensive suite of static analysis tools we use, which causes a fair bit of redundancy as we get duplicate warnings. PVS is also prone to give false warnings which creates a lot of work to identify and disable. --- src/nvim/version.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index ddfadeb44e..e3429efbd5 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -1,6 +1,3 @@ -// This is an open source non-commercial project. Dear PVS-Studio, please check -// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com - /// @file version.c /// /// Nvim was forked from Vim 7.4.160. -- cgit From 3a1bf826ff62fdfca2444c51f9eca85fade3d020 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 13 Nov 2023 00:40:34 -0800 Subject: vim-patch: mark N/A 8.1 patches #26008 Problem: Numerous Vim 8.1 patches are listed by `vim-patch.sh -l`. Solution: Mark the following patches as N/A: obviated by $NVIM env var: vim-patch:8.1.0049 shell cannot tell running in a terminal window vim-patch:8.1.0050 $VIM_TERMINAL is also set when not in a terminal window 'termwinkey' is not supported by Nvim: vim-patch:8.1.0072 use of 'termwinkey' is inconsistent Nvim handles STOP signal via libuv: vim-patch:8.1.0304 no redraw when using a STOP signal on Vim and then CONT vim-patch:8.1.0312 wrong type for flags used in signal handlers Nvim does not have `parse_queued_messages`: vim-patch:8.1.0367 getchar(1) no longer processes pending messages N/A various: vim-patch:8.1.1396 'wincolor' does not apply to lines below the buffer vim-patch:8.1.1502 cannot play any sound vim-patch:8.1.1515 memory leak reported for sound when build with EXITFREE Nvim has extmarks instead of textprops: vim-patch:8.1.0579 cannot attach properties to text vim-patch:8.1.0582 text properties are not enabled vim-patch:8.1.0634 text properties cannot cross line boundaries vim-patch:8.1.0638 text property highlighting is off by one column vim-patch:8.1.0639 text properties test fails on MS-Windows vim-patch:8.1.0643 computing byte offset wrong vim-patch:8.1.0654 when deleting a line text property flags are not adjusted vim-patch:8.1.0655 when appending a line text property flags are not added vim-patch:8.1.0663 text property display wrong when 'number' is set vim-patch:8.1.0665 text property display wrong when 'spell' is set vim-patch:8.1.0667 textprop test leaves file behind vim-patch:8.1.0675 text property column in screen columns is not practical vim-patch:8.1.0676 textprop screendump test fails vim-patch:8.1.0681 text properties as not adjusted for deleted text vim-patch:8.1.0682 text properties not adjusted when backspacing replaced text vim-patch:8.1.0688 text properties are not restored by undo vim-patch:8.1.0689 undo with text properties not tested vim-patch:8.1.0690 setline() and setbufline() do not clear text properties vim-patch:8.1.0691 text properties are not adjusted for :substitute vim-patch:8.1.0694 when using text props may free memory that is not allocated vim-patch:8.1.0703 compiler warnings with 64-bit compiler vim-patch:8.1.0707 text property columns are not adjusted for changed indent vim-patch:8.1.0970 text properties test fails when 'encoding' is not utf-8 vim-patch:8.1.1035 prop_remove() second argument is not optional vim-patch:8.1.1276 cannot combine text properties with syntax highlighting vim-patch:8.1.1278 missing change for "combine" field vim-patch:8.1.1333 text properties don't always move after changes vim-patch:8.1.1337 get empty text prop when splitting line just after text prop vim-patch:8.1.1341 text properties are lost when joining lines vim-patch:8.1.1343 text properties not adjusted for Visual block mode delete vim-patch:8.1.1340 attributes from 'cursorline' overwrite textprop vim-patch:8.1.1351 text property wrong after :substitute vim-patch:8.1.1359 text property wrong after :substitute with backslash vim-patch:8.1.1387 calling prop_add() in an empty buffer doesn't work vim-patch:8.1.1388 errors when calling prop_remove() for an unloaded buffer vim-patch:8.1.1463 gcc warns for uninitialized variable N/A Nvim has buf_attach instead of "listeners": vim-patch:8.1.1320 it is not possible to track changes to a buffer vim-patch:8.1.1321 no docs or tests for listener functions vim-patch:8.1.1326 no test for listener with partial vim-patch:8.1.1328 no test for listener with undo operation vim-patch:8.1.1332 cannot flush listeners without redrawing, mix of changes vim-patch:8.1.1335 listener callback is called after inserting text vim-patch:8.1.1419 listener callbacks may be called recursively vim-patch:8.1.1486 a listener change is merged even when it adds a line N/A build issues: vim-patch:8.1.0601 a few compiler warnings vim-patch:8.1.0612 cannot use two global runtime dirs with configure vim-patch:8.1.0684 warnings from 64-bit compiler vim-patch:8.1.1344 Coverity complains about possibly using a NULL pointer vim-patch:8.1.1376 warnings for size_t/int mixups vim-patch:8.1.1414 alloc() returning "char_u *" causes a lot of type casts vim-patch:8.1.1508 sound keeps failing on Travis vim-patch:8.1.1494 build failure N/A terminal / job control patches: vim-patch:8.1.0761 default value for brief_wait is wrong vim-patch:8.1.0824 SunOS/Solaris has a problem with ttys vim-patch:8.1.0845 having job_status() free the job causes problems vim-patch:8.1.0870 Vim doesn't use the new ConPTY support in Windows 10 vim-patch:8.1.0880 MS-Windows: inconsistent selection of winpty/conpty vim-patch:8.1.0890 pty allocation wrong if using file for out channel vim-patch:8.1.0906 using clumsy way to get console window handle vim-patch:8.1.0909 MS-Windows: using ConPTY even though it is not stable vim-patch:8.1.0928 stray log function call vim-patch:8.1.0940 MS-Windows console resizing not handled properly vim-patch:8.1.1028 MS-Windows: memory leak when creating terminal fails vim-patch:8.1.1265 when GPM mouse support is enabled double clicks do not work vim-patch:8.1.1267 cannot check if GPM mouse support is working N/A encoding patches: vim-patch:8.1.0879 MS-Windows: temp name encoding can be wrong vim-patch:8.1.0895 MS-Windows: dealing with temp name encoding not quite right vim-patch:8.1.0918 MS-Windows: startup messages are not converted vim-patch:8.1.1090 MS-Windows: modify_fname() has problems with some 'encoding' N/A platform patches: vim-patch:8.1.1103 MS-Windows: old API calls are no longer needed N/A Lua patches: vim-patch:8.1.1019 Lua: may garbage collect function reference in use N/A Nvim has floating windows instead of popup window: vim-patch:8.1.1329 plans for popup window support are spread out vim-patch:8.1.1364 design for popup window support needs more details vim-patch:8.1.1391 no popup window support vim-patch:8.1.1400 using global pointer for tab-local popups is clumsy vim-patch:8.1.1399 popup windows not adjusted when switching tabs vim-patch:8.1.0062 popup menu broken if a callback changes the window layout vim-patch:8.1.1405 "highlight" option of popup windows not supported vim-patch:8.1.1406 popup_hide() and popup_show() not implemented yet vim-patch:8.1.1407 popup_create() does not support text properties vim-patch:8.1.1410 popup_move() is not implemented yet vim-patch:8.1.1402 "timer" option of popup windows not supported vim-patch:8.1.1408 PFL_HIDDEN conflicts with system header file vim-patch:8.1.1420 popup window size only uses first line length vim-patch:8.1.1421 drawing "~" line in popup window vim-patch:8.1.1422 popup_getoptions() not implemented yet vim-patch:8.1.1423 popup windows use options from current window and buffer vim-patch:8.1.1426 no test for syntax highlight in popup window vim-patch:8.1.1427 popup window screenshot test fails vim-patch:8.1.1428 popup_atcursor() not implemented yet vim-patch:8.1.1429 "pos" option of popup window not supported yet vim-patch:8.1.1430 popup window option "wrap" not supported vim-patch:8.1.1431 popup window listed as "Scratch" vim-patch:8.1.1432 can't build with eval feature vim-patch:8.1.1438 some commands cause trouble in a popup window vim-patch:8.1.1441 popup window filter not yet implemented vim-patch:8.1.1442 popup windows not considered when the Vim window is resized vim-patch:8.1.1443 popup window padding and border not implemented yet vim-patch:8.1.1444 not using double line characters for popup border vim-patch:8.1.1445 popup window border highlight not implemented yet vim-patch:8.1.1446 popup window callback not implemented yet vim-patch:8.1.1447 not allowed to create an empty popup vim-patch:8.1.1448 statusline is sometimes drawn on top of popup vim-patch:8.1.1449 popup text truncated at end of screen vim-patch:8.1.1450 popup window positioning wrong when using padding or borders vim-patch:8.1.1451 CTRL-L does not clear screen with a popup window vim-patch:8.1.1452 line and col property of popup windows not properly checked vim-patch:8.1.1453 popup window "moved" property not implemented yet vim-patch:8.1.1455 popup_atcursor() not completely implemented vim-patch:8.1.1459 popup window border looks bad when 'ambiwidth' is "double" vim-patch:8.1.1460 popup window border characters may be wrong vim-patch:8.1.1416 popup_getposition() not implemented yet vim-patch:8.1.1493 redrawing with popups is slow and causes flicker vim-patch:8.1.1496 popup window height is not recomputed vim-patch:8.1.1499 ruler not updated after popup window was removed vim-patch:8.1.1511 matches in a popup window are not displayed properly vim-patch:8.1.1513 all popup functionality is in functions, except :popupclear vim-patch:8.1.1517 when a popup changes all windows are redrawn vim-patch:8.1.1518 crash when setting 'columns' while a popup is visible vim-patch:8.1.1520 popup windows are ignored when dealing with mouse position vim-patch:8.1.1521 when a popup window is closed the buffer remains vim-patch:8.1.1522 poup_notification() not implemented yet vim-patch:8.1.1495 memory access error vim-patch:8.1.1497 accessing memory beyond allocated space N/A already applied: vim-patch:8.1.1226 {not in Vi} remarks get in the way of useful help text vim-patch:8.1.1280 remarks about functionality not in Vi clutters the help --- src/nvim/version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index e3429efbd5..145604707d 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -2430,7 +2430,7 @@ static const int included_patches[] = { 52, 51, // 50, - // 49, + 49, 48, 47, 46, -- cgit From d718a3e27aa3a13b7a712c4a4f97ea5580b93d15 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 19:02:13 +0800 Subject: version.c: update (#26025) Co-authored-by: marvim --- src/nvim/version.c | 272 ++++++++++++++++++++++++++--------------------------- 1 file changed, 136 insertions(+), 136 deletions(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index 145604707d..d36d6a7346 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -106,7 +106,7 @@ static const int included_patches[] = { 2376, 2375, 2374, - // 2373, + 2373, 2372, // 2371, 2370, @@ -203,7 +203,7 @@ static const int included_patches[] = { // 2279, 2278, // 2277, - // 2276, + 2276, 2275, 2274, // 2273, @@ -957,43 +957,43 @@ static const int included_patches[] = { // 1525, 1524, // 1523, - // 1522, - // 1521, - // 1520, + 1522, + 1521, + 1520, 1519, - // 1518, - // 1517, + 1518, + 1517, 1516, - // 1515, + 1515, 1514, - // 1513, + 1513, 1512, - // 1511, + 1511, 1510, 1509, - // 1508, + 1508, 1507, 1506, 1505, 1504, 1503, - // 1502, + 1502, 1501, 1500, - // 1499, + 1499, 1498, - // 1497, - // 1496, - // 1495, - // 1494, - // 1493, + 1497, + 1496, + 1495, + 1494, + 1493, 1492, 1491, 1490, 1489, 1488, 1487, - // 1486, + 1486, 1485, 1484, 1483, @@ -1016,83 +1016,83 @@ static const int included_patches[] = { 1466, 1465, 1464, - // 1463, + 1463, 1462, 1461, - // 1460, - // 1459, + 1460, + 1459, 1458, 1457, 1456, - // 1455, + 1455, 1454, - // 1453, - // 1452, - // 1451, - // 1450, - // 1449, - // 1448, - // 1447, - // 1446, - // 1445, - // 1444, - // 1443, - // 1442, - // 1441, + 1453, + 1452, + 1451, + 1450, + 1449, + 1448, + 1447, + 1446, + 1445, + 1444, + 1443, + 1442, + 1441, 1440, 1439, - // 1438, + 1438, 1437, 1436, 1435, 1434, 1433, - // 1432, - // 1431, - // 1430, - // 1429, - // 1428, - // 1427, - // 1426, + 1432, + 1431, + 1430, + 1429, + 1428, + 1427, + 1426, 1425, 1424, - // 1423, - // 1422, - // 1421, - // 1420, - // 1419, + 1423, + 1422, + 1421, + 1420, + 1419, 1418, // 1417, - // 1416, + 1416, 1415, - // 1414, + 1414, // 1413, 1412, 1411, - // 1410, + 1410, 1409, - // 1408, - // 1407, - // 1406, - // 1405, + 1408, + 1407, + 1406, + 1405, 1404, 1403, - // 1402, + 1402, 1401, - // 1400, - // 1399, + 1400, + 1399, 1398, 1397, - // 1396, + 1396, // 1395, 1394, 1393, 1392, - // 1391, + 1391, 1390, // 1389, - // 1388, - // 1387, + 1388, + 1387, 1386, 1385, 1384, @@ -1103,7 +1103,7 @@ static const int included_patches[] = { 1379, 1378, 1377, - // 1376, + 1376, 1375, 1374, 1373, @@ -1115,12 +1115,12 @@ static const int included_patches[] = { 1367, 1366, 1365, - // 1364, + 1364, 1363, 1362, 1361, 1360, - // 1359, + 1359, 1358, 1357, 1356, @@ -1128,38 +1128,38 @@ static const int included_patches[] = { 1354, 1353, 1352, - // 1351, + 1351, 1350, 1349, 1348, 1347, 1346, 1345, - // 1344, - // 1343, + 1344, + 1343, 1342, - // 1341, - // 1340, + 1341, + 1340, 1339, 1338, - // 1337, + 1337, 1336, - // 1335, + 1335, 1334, - // 1333, - // 1332, + 1333, + 1332, 1331, 1330, - // 1329, - // 1328, + 1329, + 1328, 1327, - // 1326, + 1326, 1325, 1324, 1323, 1322, - // 1321, - // 1320, + 1321, + 1320, 1319, 1318, 1317, @@ -1199,11 +1199,11 @@ static const int included_patches[] = { 1283, 1282, 1281, - // 1280, + 1280, 1279, - // 1278, + 1278, 1277, - // 1276, + 1276, 1275, 1274, 1273, @@ -1212,9 +1212,9 @@ static const int included_patches[] = { 1270, 1269, 1268, - // 1267, + 1267, 1266, - // 1265, + 1265, 1264, 1263, 1262, @@ -1253,7 +1253,7 @@ static const int included_patches[] = { 1229, 1228, 1227, - // 1226, + 1226, 1225, // 1224, 1223, @@ -1376,7 +1376,7 @@ static const int included_patches[] = { // 1106, 1105, 1104, - // 1103, + 1103, 1102, 1101, 1100, @@ -1389,7 +1389,7 @@ static const int included_patches[] = { 1093, 1092, 1091, - // 1090, + 1090, 1089, 1088, 1087, @@ -1444,14 +1444,14 @@ static const int included_patches[] = { 1038, 1037, 1036, - // 1035, + 1035, 1034, 1033, 1032, 1031, 1030, 1029, - // 1028, + 1028, 1027, 1026, 1025, @@ -1460,7 +1460,7 @@ static const int included_patches[] = { 1022, 1021, 1020, - // 1019, + 1019, 1018, 1017, 1016, @@ -1509,7 +1509,7 @@ static const int included_patches[] = { 973, 972, 971, - // 970, + 970, // 969, 968, 967, @@ -1539,7 +1539,7 @@ static const int included_patches[] = { 943, 942, 941, - // 940, + 940, 939, 938, 937, @@ -1551,7 +1551,7 @@ static const int included_patches[] = { 931, 930, 929, - // 928, + 928, 927, 926, 925, @@ -1561,7 +1561,7 @@ static const int included_patches[] = { 921, 920, 919, - // 918, + 918, 917, 916, 915, @@ -1570,10 +1570,10 @@ static const int included_patches[] = { 912, 911, 910, - // 909, + 909, 908, 907, - // 906, + 906, 905, 904, 903, @@ -1584,12 +1584,12 @@ static const int included_patches[] = { 898, 897, 896, - // 895, + 895, // 894, 893, 892, 891, - // 890, + 890, 889, 888, 887, @@ -1599,8 +1599,8 @@ static const int included_patches[] = { 883, 882, 881, - // 880, - // 879, + 880, + 879, 878, 877, // 876, @@ -1609,7 +1609,7 @@ static const int included_patches[] = { 873, 872, 871, - // 870, + 870, 869, 868, 867, @@ -1634,7 +1634,7 @@ static const int included_patches[] = { 848, 847, 846, - // 845, + 845, 844, 843, 842, @@ -1655,7 +1655,7 @@ static const int included_patches[] = { 827, 826, 825, - // 824, + 824, 823, 822, 821, @@ -1718,7 +1718,7 @@ static const int included_patches[] = { 764, 763, 762, - // 761, + 761, 760, 759, 758, @@ -1772,11 +1772,11 @@ static const int included_patches[] = { // 710, 709, 708, - // 707, + 707, 706, 705, 704, - // 703, + 703, 702, 701, 700, @@ -1785,26 +1785,26 @@ static const int included_patches[] = { 697, 696, 695, - // 694, + 694, 693, 692, - // 691, - // 690, - // 689, - // 688, + 691, + 690, + 689, + 688, 687, 686, 685, - // 684, + 684, 683, - // 682, - // 681, + 682, + 681, 680, 679, 678, 677, - // 676, - // 675, + 676, + 675, 674, 673, 672, @@ -1812,11 +1812,11 @@ static const int included_patches[] = { 670, 669, 668, - // 667, + 667, 666, - // 665, + 665, 664, - // 663, + 663, 662, 661, 660, @@ -1824,8 +1824,8 @@ static const int included_patches[] = { 658, 657, 656, - // 655, - // 654, + 655, + 654, 653, 652, 651, @@ -1836,16 +1836,16 @@ static const int included_patches[] = { 646, 645, 644, - // 643, + 643, 642, 641, 640, - // 639, - // 638, + 639, + 638, 637, // 636, 635, - // 634, + 634, 633, 632, 631, @@ -1867,7 +1867,7 @@ static const int included_patches[] = { 615, 614, 613, - // 612, + 612, 611, 610, 609, @@ -1878,7 +1878,7 @@ static const int included_patches[] = { 604, 603, 602, - // 601, + 601, 600, 599, 598, @@ -1897,10 +1897,10 @@ static const int included_patches[] = { 585, 584, 583, - // 582, + 582, 581, 580, - // 579, + 579, 578, 577, 576, @@ -2112,7 +2112,7 @@ static const int included_patches[] = { 370, 369, 368, - // 367, + 367, 366, 365, 364, @@ -2167,7 +2167,7 @@ static const int included_patches[] = { 315, 314, 313, - // 312, + 312, 311, 310, 309, @@ -2175,7 +2175,7 @@ static const int included_patches[] = { 307, 306, 305, - // 304, + 304, 303, 302, 301, @@ -2407,7 +2407,7 @@ static const int included_patches[] = { 75, 74, 73, - // 72, + 72, 71, 70, 69, @@ -2417,7 +2417,7 @@ static const int included_patches[] = { // 65, 64, 63, - // 62, + 62, 61, 60, 59, @@ -2429,7 +2429,7 @@ static const int included_patches[] = { 53, 52, 51, - // 50, + 50, 49, 48, 47, -- cgit From 28f4f3c48498086307ed825d1761edb5789ca0e8 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 12 Nov 2023 15:54:54 +0100 Subject: refactor: follow style guide - reduce variable scope - prefer initialization over declaration and assignment - use bool to represent boolean values --- src/nvim/version.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index d36d6a7346..abcb9d94d2 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -2837,7 +2837,6 @@ void intro_message(int colon) static void do_intro_line(int row, char *mesg, int attr) { - char *p; int l; // Center the message horizontally. @@ -2851,7 +2850,7 @@ static void do_intro_line(int row, char *mesg, int attr) grid_line_start(&default_grid, row); // Split up in parts to highlight <> items differently. - for (p = mesg; *p != NUL; p += l) { + for (char *p = mesg; *p != NUL; p += l) { for (l = 0; p[l] != NUL && (l == 0 || (p[l] != '<' && p[l - 1] != '>')); l++) { -- cgit From ac1113ded5f8f09dd99a9894d7a7e795626fb728 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 13 Nov 2023 23:40:37 +0100 Subject: refactor: follow style guide - reduce variable scope - prefer initialization over declaration and assignment --- src/nvim/version.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index abcb9d94d2..0f50fa1ff8 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -2492,14 +2492,13 @@ bool has_nvim_version(const char *const version_str) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL { const char *p = version_str; - int major = 0; int minor = 0; int patch = 0; if (!ascii_isdigit(*p)) { return false; } - major = atoi(p); + int major = atoi(p); p = strchr(p, '.'); // Find the next dot. if (p) { @@ -2618,8 +2617,7 @@ void list_in_columns(char **items, int size, int current) int width = 0; // Find the length of the longest item, use that + 1 as the column width. - int i; - for (i = 0; size < 0 ? items[i] != NULL : i < size; i++) { + for (int i = 0; size < 0 ? items[i] != NULL : i < size; i++) { int l = vim_strsize(items[i]) + (i == current ? 2 : 0); if (l > width) { @@ -2631,7 +2629,7 @@ void list_in_columns(char **items, int size, int current) if (Columns < width) { // Not enough screen columns - show one per line - for (i = 0; i < item_count; i++) { + for (int i = 0; i < item_count; i++) { version_msg_wrap(items[i], i == current); if (msg_col > 0 && i < item_count - 1) { msg_putchar('\n'); @@ -2647,7 +2645,7 @@ void list_in_columns(char **items, int size, int current) int cur_row = 1; // "i" counts columns then rows. "idx" counts rows then columns. - for (i = 0; !got_int && i < nrow * ncol; i++) { + for (int i = 0; !got_int && i < nrow * ncol; i++) { int idx = (i / ncol) + (i % ncol) * nrow; if (idx < item_count) { int last_col = (i + 1) % ncol == 0; -- cgit From 8b428ca8b79ebb7b36c3e403ff3bcb6924a635a6 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 27 Nov 2023 16:00:21 +0100 Subject: build(IWYU): fix includes for func_attr.h --- src/nvim/version.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index 0f50fa1ff8..22ba6523a4 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -20,6 +20,7 @@ #include "nvim/charset.h" #include "nvim/drawscreen.h" #include "nvim/ex_cmds_defs.h" +#include "nvim/func_attr.h" #include "nvim/gettext.h" #include "nvim/globals.h" #include "nvim/grid.h" -- cgit From 79b6ff28ad1204fbb4199b9092f5c578d88cb28e Mon Sep 17 00:00:00 2001 From: dundargoc Date: Tue, 28 Nov 2023 20:31:00 +0100 Subject: refactor: fix headers with IWYU --- src/nvim/version.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index 22ba6523a4..d6fcfaaf1f 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -15,7 +15,7 @@ #include "auto/versiondef_git.h" #include "nvim/api/private/defs.h" #include "nvim/api/private/helpers.h" -#include "nvim/ascii.h" +#include "nvim/ascii_defs.h" #include "nvim/buffer.h" #include "nvim/charset.h" #include "nvim/drawscreen.h" @@ -32,7 +32,7 @@ #include "nvim/option_vars.h" #include "nvim/strings.h" #include "nvim/version.h" -#include "nvim/vim.h" +#include "nvim/vim_defs.h" // for ":version", ":intro", and "nvim --version" #ifndef NVIM_VERSION_MEDIUM -- cgit From a6cba103cebce535279db197f9efeb34e9d1171f Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 29 Nov 2023 20:32:40 +0800 Subject: refactor: move some constants out of vim_defs.h (#26298) --- src/nvim/version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index d6fcfaaf1f..227ecf7b3c 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -24,7 +24,7 @@ #include "nvim/gettext.h" #include "nvim/globals.h" #include "nvim/grid.h" -#include "nvim/highlight_defs.h" +#include "nvim/highlight.h" #include "nvim/lua/executor.h" #include "nvim/mbyte.h" #include "nvim/memory.h" -- cgit From 86cc791debba09c8ed1aa0d863be844108866a38 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 29 Nov 2023 23:10:21 +0800 Subject: refactor: move function macros out of vim_defs.h (#26300) --- src/nvim/version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index 227ecf7b3c..cb9088afae 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -30,9 +30,9 @@ #include "nvim/memory.h" #include "nvim/message.h" #include "nvim/option_vars.h" +#include "nvim/os/os.h" #include "nvim/strings.h" #include "nvim/version.h" -#include "nvim/vim_defs.h" // for ":version", ":intro", and "nvim --version" #ifndef NVIM_VERSION_MEDIUM -- cgit