From 08fb3b5309dee79585f3eec2450636966cbb01b4 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Tue, 31 Jan 2023 00:52:34 +0100 Subject: perf(column): only build fold/sign column when present in 'statuscolumn' Problem: The fold and sign column is built and stored regardless of whether the corresponding item is present in 'statuscolumn'. Solution: Since the 'statuscolumn' parses itself, we can defer building the columns until the corresponding item is actually encountered. --- src/nvim/fold.h | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/nvim/fold.h') diff --git a/src/nvim/fold.h b/src/nvim/fold.h index ac1e8c9419..cf44cf14c3 100644 --- a/src/nvim/fold.h +++ b/src/nvim/fold.h @@ -9,17 +9,6 @@ #include "nvim/pos.h" #include "nvim/types.h" -// Info used to pass info about a fold from the fold-detection code to the -// code that displays the foldcolumn. -typedef struct foldinfo { - linenr_T fi_lnum; // line number where fold starts - int fi_level; // level of the fold; when this is zero the - // other fields are invalid - int fi_low_level; // lowest fold level that starts in the same - // line - linenr_T fi_lines; -} foldinfo_T; - EXTERN int disable_fold_update INIT(= 0); #ifdef INCLUDE_GENERATED_DECLARATIONS -- 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/fold.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/fold.h') diff --git a/src/nvim/fold.h b/src/nvim/fold.h index cf44cf14c3..ee7501f845 100644 --- a/src/nvim/fold.h +++ b/src/nvim/fold.h @@ -4,6 +4,7 @@ #include #include "nvim/buffer_defs.h" +#include "nvim/fold_defs.h" #include "nvim/garray.h" #include "nvim/macros.h" #include "nvim/pos.h" -- cgit From 5f03a1eaabfc8de2b3a9c666fcd604763f41e152 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 20 Oct 2023 15:10:33 +0200 Subject: build(lint): remove unnecessary clint.py rules Uncrustify is the source of truth where possible. Remove any redundant checks from clint.py. --- src/nvim/fold.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/fold.h') diff --git a/src/nvim/fold.h b/src/nvim/fold.h index ee7501f845..5a1ef836d3 100644 --- a/src/nvim/fold.h +++ b/src/nvim/fold.h @@ -10,7 +10,7 @@ #include "nvim/pos.h" #include "nvim/types.h" -EXTERN int disable_fold_update INIT(= 0); +EXTERN int disable_fold_update INIT( = 0); #ifdef INCLUDE_GENERATED_DECLARATIONS # include "fold.h.generated.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/fold.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/nvim/fold.h') diff --git a/src/nvim/fold.h b/src/nvim/fold.h index 5a1ef836d3..43eb152fc0 100644 --- a/src/nvim/fold.h +++ b/src/nvim/fold.h @@ -1,5 +1,4 @@ -#ifndef NVIM_FOLD_H -#define NVIM_FOLD_H +#pragma once #include @@ -15,4 +14,3 @@ EXTERN int disable_fold_update INIT( = 0); #ifdef INCLUDE_GENERATED_DECLARATIONS # include "fold.h.generated.h" #endif -#endif // NVIM_FOLD_H -- cgit From 6361806aa28edca55ad3316a58bc3e936df9c0eb Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 26 Nov 2023 22:58:52 +0800 Subject: refactor: move garray_T to garray_defs.h (#26227) --- src/nvim/fold.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/fold.h') diff --git a/src/nvim/fold.h b/src/nvim/fold.h index 43eb152fc0..9992295ca4 100644 --- a/src/nvim/fold.h +++ b/src/nvim/fold.h @@ -4,7 +4,7 @@ #include "nvim/buffer_defs.h" #include "nvim/fold_defs.h" -#include "nvim/garray.h" +#include "nvim/garray_defs.h" #include "nvim/macros.h" #include "nvim/pos.h" #include "nvim/types.h" -- cgit From 09541d514dd18bf86f673d3784d406236fcbdad8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 27 Nov 2023 09:51:26 +0800 Subject: build(IWYU): replace public-to-public mappings with pragmas (#26237) --- src/nvim/fold.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nvim/fold.h') diff --git a/src/nvim/fold.h b/src/nvim/fold.h index 9992295ca4..630b673b58 100644 --- a/src/nvim/fold.h +++ b/src/nvim/fold.h @@ -2,9 +2,9 @@ #include -#include "nvim/buffer_defs.h" -#include "nvim/fold_defs.h" -#include "nvim/garray_defs.h" +#include "nvim/buffer_defs.h" // IWYU pragma: keep +#include "nvim/fold_defs.h" // IWYU pragma: export +#include "nvim/garray_defs.h" // IWYU pragma: keep #include "nvim/macros.h" #include "nvim/pos.h" #include "nvim/types.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/fold.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/fold.h') diff --git a/src/nvim/fold.h b/src/nvim/fold.h index 630b673b58..4b2d2cccee 100644 --- a/src/nvim/fold.h +++ b/src/nvim/fold.h @@ -6,7 +6,7 @@ #include "nvim/fold_defs.h" // IWYU pragma: export #include "nvim/garray_defs.h" // IWYU pragma: keep #include "nvim/macros.h" -#include "nvim/pos.h" +#include "nvim/pos_defs.h" #include "nvim/types.h" EXTERN int disable_fold_update INIT( = 0); -- cgit From 6c14ae6bfaf51415b555e9a6b85d1d280976358d Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 27 Nov 2023 20:27:32 +0100 Subject: refactor: rename types.h to types_defs.h --- src/nvim/fold.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/fold.h') diff --git a/src/nvim/fold.h b/src/nvim/fold.h index 4b2d2cccee..f902c8c322 100644 --- a/src/nvim/fold.h +++ b/src/nvim/fold.h @@ -7,7 +7,7 @@ #include "nvim/garray_defs.h" // IWYU pragma: keep #include "nvim/macros.h" #include "nvim/pos_defs.h" -#include "nvim/types.h" +#include "nvim/types_defs.h" EXTERN int disable_fold_update INIT( = 0); -- 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/fold.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/fold.h') diff --git a/src/nvim/fold.h b/src/nvim/fold.h index f902c8c322..3a70c11792 100644 --- a/src/nvim/fold.h +++ b/src/nvim/fold.h @@ -5,7 +5,7 @@ #include "nvim/buffer_defs.h" // IWYU pragma: keep #include "nvim/fold_defs.h" // IWYU pragma: export #include "nvim/garray_defs.h" // IWYU pragma: keep -#include "nvim/macros.h" +#include "nvim/macros_defs.h" #include "nvim/pos_defs.h" #include "nvim/types_defs.h" -- cgit