aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-05-05 08:18:36 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-05-05 09:19:06 +0800
commitb8d5586d5b0d1e2d25533ee398d16bb2e8412820 (patch)
treee2e229c61a4673297a2ed538f3924317fbcc5fb8
parent75119fcc86e055895af824f7fdbba2f42c1cbbe8 (diff)
downloadrneovim-b8d5586d5b0d1e2d25533ee398d16bb2e8412820.tar.gz
rneovim-b8d5586d5b0d1e2d25533ee398d16bb2e8412820.tar.bz2
rneovim-b8d5586d5b0d1e2d25533ee398d16bb2e8412820.zip
refactor: using a different error number for 'mousescroll'
Because E548 is linked to 'guicursor' in help.
-rw-r--r--runtime/doc/options.txt2
-rw-r--r--src/nvim/optionstr.c2
-rw-r--r--test/functional/options/mousescroll_spec.lua2
3 files changed, 3 insertions, 3 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 324151ee58..c87b6f1835 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -4254,7 +4254,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Warning: Setting this option can make pending mappings to be aborted
when the mouse is moved.
- *'mousescroll'*
+ *'mousescroll'* *E5080*
'mousescroll' string (default "ver:3,hor:6")
global
This option controls the number of lines / columns to scroll by when
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c
index 96d383bbb1..28c0e3f97d 100644
--- a/src/nvim/optionstr.c
+++ b/src/nvim/optionstr.c
@@ -514,7 +514,7 @@ const char *did_set_mousescroll(optset_T *args FUNC_ATTR_UNUSED)
// Verify that only digits follow the colon.
for (size_t i = 4; i < length; i++) {
if (!ascii_isdigit(string[i])) {
- return N_("E548: digit expected");
+ return N_("E5080: Digit expected");
}
}
diff --git a/test/functional/options/mousescroll_spec.lua b/test/functional/options/mousescroll_spec.lua
index 5bff45a836..38a9692792 100644
--- a/test/functional/options/mousescroll_spec.lua
+++ b/test/functional/options/mousescroll_spec.lua
@@ -20,7 +20,7 @@ end
describe("'mousescroll'", function()
local invalid_arg = 'Vim(set):E474: Invalid argument: mousescroll='
- local digit_expected = 'Vim(set):E548: digit expected: mousescroll='
+ local digit_expected = 'Vim(set):E5080: Digit expected: mousescroll='
local function should_fail(val, errorstr)
eq(errorstr..val, exc_exec('set mousescroll='..val))