From 691f4715c0cf4bc11ea2280db8777e6dd174a8ac Mon Sep 17 00:00:00 2001 From: Dundar Göc Date: Fri, 26 Aug 2022 23:11:25 +0200 Subject: refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459 --- src/nvim/normal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/normal.h') diff --git a/src/nvim/normal.h b/src/nvim/normal.h index 9bda70eacd..13ea233658 100644 --- a/src/nvim/normal.h +++ b/src/nvim/normal.h @@ -57,7 +57,7 @@ typedef struct oparg_S { * Arguments for Normal mode commands. */ typedef struct cmdarg_S { - oparg_T *oap; // Operator arguments + oparg_T *oap; // Operator arguments int prechar; // prefix character (optional, always 'g') int cmdchar; // command character int nchar; // next command character (optional) @@ -69,7 +69,7 @@ typedef struct cmdarg_S { long count1; // count before command, default 1 int arg; // extra argument from nv_cmds[] int retval; // return: CA_* values - char_u *searchbuf; // return: pointer to search pattern or NULL + char *searchbuf; // return: pointer to search pattern or NULL } cmdarg_T; // values for retval: -- cgit 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/normal.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/nvim/normal.h') diff --git a/src/nvim/normal.h b/src/nvim/normal.h index 13ea233658..0317080f4f 100644 --- a/src/nvim/normal.h +++ b/src/nvim/normal.h @@ -22,9 +22,7 @@ typedef enum { kMTUnknown = -1, ///< Unknown or invalid motion type } MotionType; -/* - * Arguments for operators. - */ +// Arguments for operators. typedef struct oparg_S { int op_type; // current pending operator type int regname; // register to use for the operator @@ -53,9 +51,7 @@ typedef struct oparg_S { // block } oparg_T; -/* - * Arguments for Normal mode commands. - */ +// Arguments for Normal mode commands. typedef struct cmdarg_S { oparg_T *oap; // Operator arguments int prechar; // prefix character (optional, always 'g') -- 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/normal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/normal.h') diff --git a/src/nvim/normal.h b/src/nvim/normal.h index 0317080f4f..43d892e49a 100644 --- a/src/nvim/normal.h +++ b/src/nvim/normal.h @@ -3,7 +3,7 @@ #include -#include "nvim/buffer_defs.h" // for win_T +#include "nvim/buffer_defs.h" #include "nvim/pos.h" // Values for find_ident_under_cursor() -- cgit From 5b89d480e30367259f82680945572b1406219da5 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Thu, 15 Dec 2022 21:23:28 +0100 Subject: vim-patch:9.0.1061: cannot display 'showcmd' somewhere else Problem: Cannot display 'showcmd' somewhere else. Solution: Add the 'showcmdloc' option. (Luuk van Baal, closes vim/vim#11684) https://github.com/vim/vim/commit/ba936f6f4e85cc1408bc3967f9fd7665d948909b Co-authored-by: Luuk van Baal --- src/nvim/normal.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/nvim/normal.h') diff --git a/src/nvim/normal.h b/src/nvim/normal.h index 43d892e49a..90a5c4103e 100644 --- a/src/nvim/normal.h +++ b/src/nvim/normal.h @@ -72,6 +72,12 @@ typedef struct cmdarg_S { #define CA_COMMAND_BUSY 1 // skip restarting edit() once #define CA_NO_ADJ_OP_END 2 // don't adjust operator end +// columns needed by shown command +#define SHOWCMD_COLS 10 +// 'showcmd' buffer shared between normal.c and statusline.c +#define SHOWCMD_BUFLEN (SHOWCMD_COLS + 1 + 30) +EXTERN char showcmd_buf[SHOWCMD_BUFLEN]; + #ifdef INCLUDE_GENERATED_DECLARATIONS # include "normal.h.generated.h" #endif -- cgit From 3269902a13df3bccf8705db73488c0a47f495514 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 15 Jan 2023 14:16:33 +0100 Subject: refactor: fix IWYU mapping file and use IWYU (#21802) Also add the EXITFREE definition to main_lib rather than the nvim target, as the header generation needs the EXITFREE flag to work properly. --- src/nvim/normal.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/normal.h') diff --git a/src/nvim/normal.h b/src/nvim/normal.h index 90a5c4103e..bed1a40b97 100644 --- a/src/nvim/normal.h +++ b/src/nvim/normal.h @@ -4,6 +4,7 @@ #include #include "nvim/buffer_defs.h" +#include "nvim/macros.h" #include "nvim/pos.h" // Values for find_ident_under_cursor() -- cgit