diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-03-08 06:44:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-08 06:44:57 +0800 |
commit | 5f3579e6ea12659d48e92b2126f83777908c28fc (patch) | |
tree | 4a82bc639e44680c635c04916e56da33cfdcbbbe /src/nvim/eval/funcs.c | |
parent | 3e569d440b8e5a2b190a7013081d29cb7e04af01 (diff) | |
download | rneovim-5f3579e6ea12659d48e92b2126f83777908c28fc.tar.gz rneovim-5f3579e6ea12659d48e92b2126f83777908c28fc.tar.bz2 rneovim-5f3579e6ea12659d48e92b2126f83777908c28fc.zip |
vim-patch:9.1.0157: Duplicate assignment in f_getregion() (#27766)
Problem: Duplicate assignment in f_getregion().
Solution: Remove the duplicate assignment. Also improve getregion()
docs wording and fix an unrelated typo (zeertzjq)
closes: vim/vim#14154
https://github.com/vim/vim/commit/0df8f93bdaea77a1afb9f4eca94fe67ec73e6df2
Diffstat (limited to 'src/nvim/eval/funcs.c')
-rw-r--r-- | src/nvim/eval/funcs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index 67443b66bc..2f9472f158 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -2862,7 +2862,7 @@ static void f_getregion(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) return; } - buf_T *save_curbuf = curbuf; + buf_T *const save_curbuf = curbuf; if (fnum1 != 0) { buf_T *findbuf = buflist_findnr(fnum1); @@ -2870,7 +2870,6 @@ static void f_getregion(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) if (findbuf == NULL || findbuf->b_ml.ml_mfp == NULL) { return; } - save_curbuf = curbuf; curbuf = findbuf; } |