diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-01-25 18:31:55 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-01-25 18:31:55 +0000 |
commit | 067dc73729267c0262438a6fdd66e586f8496946 (patch) | |
tree | d2e832f1a08083fd1457aaba9a774e72d69e5266 /src/nvim/cursor_shape.c | |
parent | cd16d3df4c2a21ada895a1353712969045e5c728 (diff) | |
parent | 3c48d3c83fc21dbc0841f9210f04bdb073d73cd1 (diff) | |
download | rneovim-067dc73729267c0262438a6fdd66e586f8496946.tar.gz rneovim-067dc73729267c0262438a6fdd66e586f8496946.tar.bz2 rneovim-067dc73729267c0262438a6fdd66e586f8496946.zip |
Merge remote-tracking branch 'upstream/master' into fix_repeatcmdline
Diffstat (limited to 'src/nvim/cursor_shape.c')
-rw-r--r-- | src/nvim/cursor_shape.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/nvim/cursor_shape.c b/src/nvim/cursor_shape.c index 9c33b1a806..f21e632036 100644 --- a/src/nvim/cursor_shape.c +++ b/src/nvim/cursor_shape.c @@ -1,15 +1,23 @@ // 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 -#include <assert.h> +#include <stdbool.h> #include <stdint.h> +#include <string.h> +#include "nvim/api/private/defs.h" #include "nvim/api/private/helpers.h" #include "nvim/ascii.h" #include "nvim/charset.h" #include "nvim/cursor_shape.h" #include "nvim/ex_getln.h" +#include "nvim/gettext.h" +#include "nvim/globals.h" #include "nvim/highlight_group.h" +#include "nvim/log.h" +#include "nvim/macros.h" +#include "nvim/memory.h" +#include "nvim/option_defs.h" #include "nvim/strings.h" #include "nvim/ui.h" #include "nvim/vim.h" @@ -19,8 +27,7 @@ #endif /// Handling of cursor and mouse pointer shapes in various modes. -cursorentry_T shape_table[SHAPE_IDX_COUNT] = -{ +cursorentry_T shape_table[SHAPE_IDX_COUNT] = { // Values are set by 'guicursor' and 'mouseshape'. // Adjust the SHAPE_IDX_ defines when changing this! { "normal", 0, 0, 0, 700L, 400L, 250L, 0, 0, "n", SHAPE_CURSOR + SHAPE_MOUSE }, @@ -120,7 +127,7 @@ char *parse_shape_opt(int what) } } // Repeat for all comma separated parts. - char *modep = (char *)p_guicursor; + char *modep = p_guicursor; while (modep != NULL && *modep != NUL) { colonp = vim_strchr(modep, ':'); commap = vim_strchr(modep, ','); @@ -220,7 +227,7 @@ char *parse_shape_opt(int what) endp = vim_strchr(p, '-'); if (commap == NULL) { // last part if (endp == NULL) { - endp = p + STRLEN(p); // find end of part + endp = p + strlen(p); // find end of part } } else if (endp > commap || endp == NULL) { endp = commap; |