]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.1.0322: Test_copy_winopt() does not restore 'hidden' v8.1.0322
authorBram Moolenaar <Bram@vim.org>
Thu, 23 Aug 2018 20:20:35 +0000 (22:20 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 23 Aug 2018 20:20:35 +0000 (22:20 +0200)
Problem:    Test_copy_winopt() does not restore 'hidden'.
Solution:   Restore the option, fix indent. (Ozaki Kiichi, closes #3367)

src/testdir/test_options.vim
src/version.c

index 2d4a97aa18445b0936e5a296dc61724b6a0a8d03..f34168228d2a6e63bbe4055cd4bb800a1b4870ee 100644 (file)
@@ -350,55 +350,57 @@ func Test_backupskip()
 endfunc
 
 func Test_copy_winopt()
-    set hidden
-
-    " Test copy option from current buffer in window
-    split
-    enew
-    setlocal numberwidth=5
-    wincmd w
-    call assert_equal(4,&numberwidth)
-    bnext
-    call assert_equal(5,&numberwidth)
-    bw!
-    call assert_equal(4,&numberwidth)
-
-    " Test copy value from window that used to be display the buffer
-    split
-    enew
-    setlocal numberwidth=6
-    bnext
-    wincmd w
-    call assert_equal(4,&numberwidth)
-    bnext
-    call assert_equal(6,&numberwidth)
-    bw!
-
-    " Test that if buffer is current, don't use the stale cached value
-    " from the last time the buffer was displayed.
-    split
-    enew
-    setlocal numberwidth=7
-    bnext
-    bnext
-    setlocal numberwidth=8
-    wincmd w
-    call assert_equal(4,&numberwidth)
-    bnext
-    call assert_equal(8,&numberwidth)
-    bw!
-
-    " Test value is not copied if window already has seen the buffer
-    enew
-    split
-    setlocal numberwidth=9
-    bnext
-    setlocal numberwidth=10
-    wincmd w
-    call assert_equal(4,&numberwidth)
-    bnext
-    call assert_equal(4,&numberwidth)
-    bw!
+  set hidden
+
+  " Test copy option from current buffer in window
+  split
+  enew
+  setlocal numberwidth=5
+  wincmd w
+  call assert_equal(4,&numberwidth)
+  bnext
+  call assert_equal(5,&numberwidth)
+  bw!
+  call assert_equal(4,&numberwidth)
+
+  " Test copy value from window that used to be display the buffer
+  split
+  enew
+  setlocal numberwidth=6
+  bnext
+  wincmd w
+  call assert_equal(4,&numberwidth)
+  bnext
+  call assert_equal(6,&numberwidth)
+  bw!
+
+  " Test that if buffer is current, don't use the stale cached value
+  " from the last time the buffer was displayed.
+  split
+  enew
+  setlocal numberwidth=7
+  bnext
+  bnext
+  setlocal numberwidth=8
+  wincmd w
+  call assert_equal(4,&numberwidth)
+  bnext
+  call assert_equal(8,&numberwidth)
+  bw!
+
+  " Test value is not copied if window already has seen the buffer
+  enew
+  split
+  setlocal numberwidth=9
+  bnext
+  setlocal numberwidth=10
+  wincmd w
+  call assert_equal(4,&numberwidth)
+  bnext
+  call assert_equal(4,&numberwidth)
+  bw!
+
+  set hidden&
 endfunc
 
 func Test_shortmess_F()
index 38afc4f351d93fcca1c02d54fcad796ec257eb6b..919d790fa1bc6ad7e6c3738cd1630de5247cedfe 100644 (file)
@@ -794,6 +794,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    322,
 /**/
     321,
 /**/