aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/cursor_shape.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-05-05 09:50:36 +0800
committerGitHub <noreply@github.com>2023-05-05 09:50:36 +0800
commit9ded4c127599b821d0875db9d63049b5970437a4 (patch)
tree04ab960fec3aaaf6d139164e27ee8c4c6ff8f900 /src/nvim/cursor_shape.c
parentd79e72621226cae91c8d8f6ad23e3c0670e1211c (diff)
parentbdaaf2e8e113f8c32c70f83b60e0bf3f648357c1 (diff)
downloadrneovim-9ded4c127599b821d0875db9d63049b5970437a4.tar.gz
rneovim-9ded4c127599b821d0875db9d63049b5970437a4.tar.bz2
rneovim-9ded4c127599b821d0875db9d63049b5970437a4.zip
Merge pull request #23483 from zeertzjq/vim-8.2.3135
vim-patch:8.2.{3135,4890,4892},9.0.0250: error message improvements
Diffstat (limited to 'src/nvim/cursor_shape.c')
-rw-r--r--src/nvim/cursor_shape.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/cursor_shape.c b/src/nvim/cursor_shape.c
index f21e632036..428f9f28e4 100644
--- a/src/nvim/cursor_shape.c
+++ b/src/nvim/cursor_shape.c
@@ -26,6 +26,8 @@
# include "cursor_shape.c.generated.h"
#endif
+static const char e_digit_expected[] = N_("E548: Digit expected");
+
/// Handling of cursor and mouse pointer shapes in various modes.
cursorentry_T shape_table[SHAPE_IDX_COUNT] = {
// Values are set by 'guicursor' and 'mouseshape'.
@@ -101,7 +103,7 @@ Array mode_style_array(Arena *arena)
/// @param what SHAPE_CURSOR or SHAPE_MOUSE ('mouseshape')
///
/// @returns error message for an illegal option, NULL otherwise.
-char *parse_shape_opt(int what)
+const char *parse_shape_opt(int what)
{
char *colonp;
char *commap;
@@ -194,7 +196,7 @@ char *parse_shape_opt(int what)
if (len != 0) {
p += len;
if (!ascii_isdigit(*p)) {
- return N_("E548: digit expected");
+ return e_digit_expected;
}
int n = getdigits_int(&p, false, 0);
if (len == 3) { // "ver" or "hor"