0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 9.1.0157: Duplicate assignment in f_getregion()

Problem:  Duplicate assignment in f_getregion().
Solution: Remove the duplicate assignment.  Also improve getregion()
          docs wording and fix an unrelated typo (zeertzjq)

closes: #14154

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq 2024-03-07 21:40:53 +01:00 committed by Christian Brabandt
parent 769eb2d0c3
commit 0df8f93bda
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
4 changed files with 8 additions and 7 deletions

View File

@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.1. Last change: 2024 Mar 06 *builtin.txt* For Vim version 9.1. Last change: 2024 Mar 07
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -4280,7 +4280,7 @@ getregion({pos1}, {pos2} [, {opts}]) *getregion()*
{pos1} and {pos2} must both be |List|s with four numbers. {pos1} and {pos2} must both be |List|s with four numbers.
See |getpos()| for the format of the list. It's possible See |getpos()| for the format of the list. It's possible
to specify positions from a different buffer, but please to specify positions from a different buffer, but please
note the limitations at |getregion-notes| note the limitations at |getregion-notes|.
The optional argument {opts} is a Dict and supports the The optional argument {opts} is a Dict and supports the
following items: following items:
@ -4314,9 +4314,9 @@ getregion({pos1}, {pos2} [, {opts}]) *getregion()*
- If {pos1} and {pos2} are not in the same buffer, an empty - If {pos1} and {pos2} are not in the same buffer, an empty
list is returned. list is returned.
- {pos1} and {pos2} must belong to a |bufloaded()| buffer. - {pos1} and {pos2} must belong to a |bufloaded()| buffer.
- It is evaluated in current window context, this makes a - It is evaluated in current window context, which makes a
different if a buffer is displayed in a different window and difference if the buffer is displayed in a window with
'virtualedit' or 'list' is set different 'virtualedit' or 'list' values.
Examples: > Examples: >
:xnoremap <CR> :xnoremap <CR>

View File

@ -5546,7 +5546,6 @@ f_getregion(typval_T *argvars, typval_T *rettv)
// buffer not loaded // buffer not loaded
if (findbuf == NULL || findbuf->b_ml.ml_mfp == NULL) if (findbuf == NULL || findbuf->b_ml.ml_mfp == NULL)
return; return;
save_curbuf = curbuf;
curbuf = findbuf; curbuf = findbuf;
} }

View File

@ -583,7 +583,7 @@ funct Test_undofile()
endif endif
call assert_equal('', undofile('')) call assert_equal('', undofile(''))
" Test undofile() with 'undodir' set to to an existing directory. " Test undofile() with 'undodir' set to an existing directory.
call mkdir('Xundodir') call mkdir('Xundodir')
set undodir=Xundodir set undodir=Xundodir
let cwd = getcwd() let cwd = getcwd()

View File

@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
157,
/**/ /**/
156, 156,
/**/ /**/