From d510bfbc8e447b1a60d5ec7faaa8f440eb4ef56f Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 2 Apr 2023 10:11:42 +0200 Subject: refactor: remove char_u (#22829) Closes https://github.com/neovim/neovim/issues/459 --- src/nvim/charset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/charset.h') diff --git a/src/nvim/charset.h b/src/nvim/charset.h index e1ef06ef1d..f98ed94b87 100644 --- a/src/nvim/charset.h +++ b/src/nvim/charset.h @@ -54,6 +54,6 @@ static inline bool vim_isbreak(int c) /// Used very often if 'linebreak' is set static inline bool vim_isbreak(int c) { - return breakat_flags[(char_u)c]; + return breakat_flags[(uint8_t)c]; } #endif // NVIM_CHARSET_H -- cgit From 6a273af10517d1f7e4ea85635f1d25a9158adeb5 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 13 May 2023 10:40:53 +0800 Subject: refactor: remove typval.h from most header files (#23601) Because typval_defs.h is enough for most of them. --- src/nvim/charset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/charset.h') diff --git a/src/nvim/charset.h b/src/nvim/charset.h index f98ed94b87..258e95bec0 100644 --- a/src/nvim/charset.h +++ b/src/nvim/charset.h @@ -4,7 +4,7 @@ #include #include "nvim/buffer_defs.h" -#include "nvim/eval/typval.h" +#include "nvim/eval/typval_defs.h" #include "nvim/option_defs.h" #include "nvim/pos.h" #include "nvim/strings.h" -- cgit From 93af6d9ed0af984be7fc383f25ca20b595961c46 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 25 Aug 2023 19:36:43 +0800 Subject: refactor: move virtcol functions to plines.c Problem: Functions for virtcol and chartabsize are similar (both compute horizontal size), but appear in two different source files. Solution: Move virtcol functions to plines.c. --- src/nvim/charset.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/nvim/charset.h') diff --git a/src/nvim/charset.h b/src/nvim/charset.h index 258e95bec0..cb5fbb22ed 100644 --- a/src/nvim/charset.h +++ b/src/nvim/charset.h @@ -2,13 +2,12 @@ #define NVIM_CHARSET_H #include +#include #include "nvim/buffer_defs.h" #include "nvim/eval/typval_defs.h" -#include "nvim/option_defs.h" #include "nvim/pos.h" #include "nvim/strings.h" -#include "nvim/types.h" /// Return the folded-case equivalent of the given character /// -- 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/charset.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/charset.h') diff --git a/src/nvim/charset.h b/src/nvim/charset.h index cb5fbb22ed..d633136073 100644 --- a/src/nvim/charset.h +++ b/src/nvim/charset.h @@ -6,6 +6,7 @@ #include "nvim/buffer_defs.h" #include "nvim/eval/typval_defs.h" +#include "nvim/option_defs.h" #include "nvim/pos.h" #include "nvim/strings.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/charset.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/charset.h') diff --git a/src/nvim/charset.h b/src/nvim/charset.h index d633136073..d615012cd5 100644 --- a/src/nvim/charset.h +++ b/src/nvim/charset.h @@ -7,6 +7,7 @@ #include "nvim/buffer_defs.h" #include "nvim/eval/typval_defs.h" #include "nvim/option_defs.h" +#include "nvim/option_vars.h" #include "nvim/pos.h" #include "nvim/strings.h" -- cgit From 4f8941c1a5f1ef6caa410feeb52e343db22763ce Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 10 Nov 2023 12:23:42 +0100 Subject: refactor: replace manual header guards with #pragma once It is less error-prone than manually defining header guards. Pretty much all compilers support it even if it's not part of the C standard. --- src/nvim/charset.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/nvim/charset.h') diff --git a/src/nvim/charset.h b/src/nvim/charset.h index d615012cd5..79ae20c29b 100644 --- a/src/nvim/charset.h +++ b/src/nvim/charset.h @@ -1,5 +1,4 @@ -#ifndef NVIM_CHARSET_H -#define NVIM_CHARSET_H +#pragma once #include #include @@ -57,4 +56,3 @@ static inline bool vim_isbreak(int c) { return breakat_flags[(uint8_t)c]; } -#endif // NVIM_CHARSET_H -- cgit From f4aedbae4cb1f206f5b7c6142697b71dd473059b Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 27 Nov 2023 18:39:38 +0100 Subject: build(IWYU): fix includes for undo_defs.h --- src/nvim/charset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/charset.h') diff --git a/src/nvim/charset.h b/src/nvim/charset.h index 79ae20c29b..cfab0f8517 100644 --- a/src/nvim/charset.h +++ b/src/nvim/charset.h @@ -7,7 +7,7 @@ #include "nvim/eval/typval_defs.h" #include "nvim/option_defs.h" #include "nvim/option_vars.h" -#include "nvim/pos.h" +#include "nvim/pos_defs.h" #include "nvim/strings.h" /// Return the folded-case equivalent of the given character -- cgit