commit 0bf4b7898cd6a50675485a82f8f40ff22b38c5ab
parent 7fcdb0541f0d801904a509a0f9514bbe0091032b
Author: zeertzjq <zeertzjq@outlook.com>
Date: Fri, 5 Sep 2025 08:20:28 +0800
vim-patch:9.1.1731: Not using const qualifier for opchars (#35634)
Problem: Not using const qualifier
Solution: Mark the opchars array const
closes: vim/vim#18196
https://github.com/vim/vim/commit/63a02ca39a73c81683ffe182c8cea9000d523299
Co-authored-by: Damien Lejay <damien@lejay.be>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
@@ -99,7 +99,7 @@ static const char e_search_pattern_and_expression_register_may_not_contain_two_o
/// The names of operators.
/// IMPORTANT: Index must correspond with defines in ops.h!!!
/// The third field indicates whether the operator always works on lines.
-static char opchars[][3] = {
+static const char opchars[][3] = {
{ NUL, NUL, 0 }, // OP_NOP
{ 'd', NUL, OPF_CHANGE }, // OP_DELETE
{ 'y', NUL, 0 }, // OP_YANK