]> granicus.if.org Git - vim/commitdiff
patch 8.2.3592: Test_hlset fails when terminal has many columns v8.2.3592
authorDominique Pelle <dominique.pelle@gmail.com>
Sat, 13 Nov 2021 18:44:37 +0000 (18:44 +0000)
committerBram Moolenaar <Bram@vim.org>
Sat, 13 Nov 2021 18:44:37 +0000 (18:44 +0000)
Problem:    Test_hlset fails when terminal has many columns.
Solution:   Set the number of columns to 80. (Dominique PellĂ©, closes #9101,
            closes #9100)

src/testdir/test_highlight.vim
src/version.c

index 51fd4145f01556ee47e6dbfc4732dd520267893b..bc0611891f60647fbdb483ae599fe9883f91095f 100644 (file)
@@ -1046,6 +1046,9 @@ endfunc
 
 " Test for the hlset() function
 func Test_hlset()
+  let save_columns = &columns
+  let &columns = 80
+
   let lines =<< trim END
     call assert_equal(0, hlset(test_null_list()))
     call assert_equal(0, hlset([]))
@@ -1150,6 +1153,8 @@ func Test_hlset()
                       \ 'term': attr, 'cterm': attr}], hlget('myhlg2'))
   END
   call CheckLegacyAndVim9Success(lines)
+
+  let &columns = save_columns
 endfunc
 
 " vim: shiftwidth=2 sts=2 expandtab
index ca022bf8b35405bcfc2fb806afc7f2befe6d22b0..c0acd4b676f7cd27e749888e069357c8f28886aa 100644 (file)
@@ -757,6 +757,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3592,
 /**/
     3591,
 /**/