From e72b546354cd90bf0cd8ee6dd045538d713009ad 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/cursor_shape.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nvim/cursor_shape.h') diff --git a/src/nvim/cursor_shape.h b/src/nvim/cursor_shape.h index 93bddd47c7..33d0344c2d 100644 --- a/src/nvim/cursor_shape.h +++ b/src/nvim/cursor_shape.h @@ -44,9 +44,9 @@ typedef struct cursor_entry { CursorShape shape; ///< cursor shape: one of the SHAPE_ defines int mshape; ///< mouse shape: one of the MSHAPE defines int percentage; ///< percentage of cell for bar - long blinkwait; ///< blinking, wait time before blinking starts - long blinkon; ///< blinking, on time - long blinkoff; ///< blinking, off time + int blinkwait; ///< blinking, wait time before blinking starts + int blinkon; ///< blinking, on time + int blinkoff; ///< blinking, off time int id; ///< highlight group ID int id_lm; ///< highlight group ID for :lmap mode char *name; ///< mode short name -- 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/cursor_shape.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/nvim/cursor_shape.h') diff --git a/src/nvim/cursor_shape.h b/src/nvim/cursor_shape.h index 33d0344c2d..1d4e1796f6 100644 --- a/src/nvim/cursor_shape.h +++ b/src/nvim/cursor_shape.h @@ -1,5 +1,4 @@ -#ifndef NVIM_CURSOR_SHAPE_H -#define NVIM_CURSOR_SHAPE_H +#pragma once #include "nvim/api/private/defs.h" #include "nvim/types.h" @@ -58,4 +57,3 @@ extern cursorentry_T shape_table[SHAPE_IDX_COUNT]; #ifdef INCLUDE_GENERATED_DECLARATIONS # include "cursor_shape.h.generated.h" #endif -#endif // NVIM_CURSOR_SHAPE_H -- cgit From 574d25642fc9ca65b396633aeab6e2d32778b642 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 27 Nov 2023 17:21:58 +0800 Subject: refactor: move Arena and ArenaMem to memory_defs.h (#26240) --- src/nvim/cursor_shape.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/cursor_shape.h') diff --git a/src/nvim/cursor_shape.h b/src/nvim/cursor_shape.h index 1d4e1796f6..4c1d6d4eec 100644 --- a/src/nvim/cursor_shape.h +++ b/src/nvim/cursor_shape.h @@ -1,7 +1,7 @@ #pragma once -#include "nvim/api/private/defs.h" -#include "nvim/types.h" +#include "nvim/api/private/defs.h" // IWYU pragma: keep +#include "nvim/memory_defs.h" // IWYU pragma: keep /// struct to store values from 'guicursor' and 'mouseshape' /// Indexes in shape_table[] -- cgit