]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.1.1005: test fails because t_F2 is not set v8.1.1005
authorBram Moolenaar <Bram@vim.org>
Mon, 11 Mar 2019 07:05:50 +0000 (08:05 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 11 Mar 2019 07:05:50 +0000 (08:05 +0100)
Problem:    Test fails because t_F2 is not set.
Solution:   Add try-catch.

src/testdir/test_registers.vim
src/version.c

index b57555aed46a1ef28e2d8a173efcab8d1a050268..ebcc8e1d0a88beeee9c7003f204c87be37339e54 100644 (file)
@@ -151,12 +151,17 @@ endfunc
 " characters as an escape sequence.
 func Test_recording_esc_sequence()
   new
-  let save_F2 = &t_F2
+  try
+    let save_F2 = &t_F2
+  catch
+  endtry
   let t_F2 = "\<Esc>OQ"
   call feedkeys("qqiTest\<Esc>", "xt")
   call feedkeys("OQuirk\<Esc>q", "xt")
   call feedkeys("Go\<Esc>@q", "xt")
   call assert_equal(['Quirk', 'Test', 'Quirk', 'Test'], getline(1, 4))
   bwipe!
-  let t_F2 = save_F2
+  if exists('save_F2')
+    let t_F2 = save_F2
+  endif
 endfunc
index 0b0ab0c74a2f5e9c5ac213a6c057a1b3d9a65251..38d5286942b5cf3ba238ca3bb05557f3c8b397ef 100644 (file)
@@ -779,6 +779,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1005,
 /**/
     1004,
 /**/