]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0157: Duplicate assignment in f_getregion() v9.1.0157
authorzeertzjq <zeertzjq@outlook.com>
Thu, 7 Mar 2024 20:40:53 +0000 (21:40 +0100)
committerChristian Brabandt <cb@256bit.org>
Thu, 7 Mar 2024 20:43:21 +0000 (21:43 +0100)
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>
runtime/doc/builtin.txt
src/evalfunc.c
src/testdir/test_undo.vim
src/version.c

index 09b4dd068ea02e66b3779b89ddd64385fb8815f0..fb957e54a95b038321841bc9cf046d92aa8a95a6 100644 (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
@@ -4280,7 +4280,7 @@ getregion({pos1}, {pos2} [, {opts}])                      *getregion()*
                {pos1} and {pos2} must both be |List|s with four numbers.
                See |getpos()| for the format of the list.  It's possible
                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
                following items:
@@ -4314,9 +4314,9 @@ getregion({pos1}, {pos2} [, {opts}])                      *getregion()*
                - If {pos1} and {pos2} are not in the same buffer, an empty
                  list is returned.
                - {pos1} and {pos2} must belong to a |bufloaded()| buffer.
-               - It is evaluated in current window context, this makes a
-                 different if a buffer is displayed in a different window and
-                 'virtualedit' or 'list' is set
+               - It is evaluated in current window context, which makes a
+                 difference if the buffer is displayed in a window with
+                 different 'virtualedit' or 'list' values.
 
                Examples: >
                        :xnoremap <CR>
index 23d5dd3867943e88fb8093e6f66e2453801f2f61..2bb9ccec55347fee714cc90b6b9757761e0bb0dd 100644 (file)
@@ -5546,7 +5546,6 @@ f_getregion(typval_T *argvars, typval_T *rettv)
        // buffer not loaded
        if (findbuf == NULL || findbuf->b_ml.ml_mfp == NULL)
            return;
-       save_curbuf = curbuf;
        curbuf = findbuf;
     }
 
index 13c4990b8c26f931759b9b4ddc00b430baadab97..eec0e0bc0691178831d908cf87b32e1dc27d8445 100644 (file)
@@ -583,7 +583,7 @@ funct Test_undofile()
   endif
   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')
   set undodir=Xundodir
   let cwd = getcwd()
index 03ad6fe19793c34b8d9f69222c75b3e28431f93e..86537c4377ad570030d3c1ab0ee8bc2b30b36fc9 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    157,
 /**/
     156,
 /**/