]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.2100: CI: test_termdebug fails v9.0.2100
authorChristian Brabandt <cb@256bit.org>
Sat, 11 Nov 2023 17:59:33 +0000 (18:59 +0100)
committerChristian Brabandt <cb@256bit.org>
Sat, 11 Nov 2023 17:59:33 +0000 (18:59 +0100)
Problem:  CI: test_termdebug fails
Solution: only test for a changed winlayout, if the window
          width actually changed

Also, include an unrelated comment (which doesn't warrant its own patch
number)

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/test_termdebug.vim
src/textformat.c
src/version.c

index 3b2b8c1afd52e680639705d3546f2f882ce9ce41..16de0578039de3bfb87f9f343e6745cd1fa01e4e 100644 (file)
@@ -96,16 +96,22 @@ func Test_termdebug_basic()
     bw!
   endif
   set columns=160
+  let winw = winwidth(0)
   Var
-  call assert_equal(winnr(), winnr('$') - 1)
-  call assert_equal(winlayout(), ['col', [['leaf', 1002], ['leaf', 1001], ['row', [['leaf', 1003 + cn], ['leaf', 1000]]]]])
-  let cn += 1
-  bw!
+  if winwidth(0) < winw
+    call assert_equal(winnr(), winnr('$') - 1)
+    call assert_equal(winlayout(), ['col', [['leaf', 1002], ['leaf', 1001], ['row', [['leaf', 1003 + cn], ['leaf', 1000]]]]])
+    let cn += 1
+    bw!
+  endif
+  let winw = winwidth(0)
   Asm
-  call assert_equal(winnr(), winnr('$') - 1)
-  call assert_equal(winlayout(), ['col', [['leaf', 1002], ['leaf', 1001], ['row', [['leaf', 1003 + cn], ['leaf', 1000]]]]])
-  let cn += 1
-  bw!
+  if winwidth(0) < winw
+    call assert_equal(winnr(), winnr('$') - 1)
+    call assert_equal(winlayout(), ['col', [['leaf', 1002], ['leaf', 1001], ['row', [['leaf', 1003 + cn], ['leaf', 1000]]]]])
+    let cn += 1
+    bw!
+  endif
   set columns&
 
   wincmd t
index afa94d881209f2510e1f6ed87f1bb7c42687a53e..a1a3e161acbca030aef3a3611ed1c5d83403954a 100644 (file)
@@ -989,7 +989,7 @@ format_lines(
     // length of a line to force formatting: 3 * 'tw'
     max_len = comp_textwidth(TRUE) * 3;
 
-    // check for 'q', '2' and '1' in 'formatoptions'
+    // check for 'q', '2', 'n' and 'w' in 'formatoptions'
     do_comments = has_format_option(FO_Q_COMS);
     do_second_indent = has_format_option(FO_Q_SECOND);
     do_number_indent = has_format_option(FO_Q_NUMBER);
index e06b0864cfb6406f2c9101cffecd052f62dcc087..02d3472e641c7c9627281f96748201f4275a7861 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2100,
 /**/
     2099,
 /**/