mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 11:18:19 +00:00
vim-patch:8.2.2969: subtracting from number option fails when result is zero
Problem: Subtracting from number option fails when result is zero. (Ingo
Karkat)
Solution: Reset the string value when using the numeric value.
(closes vim/vim#8351)
a42e6e0082
Cherry-pick Test_compound_assignment_operators() changes from patch 8.2.1593
This commit is contained in:
@@ -663,6 +663,7 @@ static char *ex_let_one(char *arg, typval_T *const tv, const bool copy, const bo
|
||||
case '%':
|
||||
n = num_modulus(numval, n); break;
|
||||
}
|
||||
s = NULL;
|
||||
} else if (opt_type == gov_string && stringval != NULL && s != NULL) {
|
||||
// string
|
||||
char *const oldstringval = stringval;
|
||||
|
Reference in New Issue
Block a user