diff src/testdir/test_termdebug.vim @ 33735:c6e847116941

runtime(termdebug): improve window handling, shorten var types Commit: https://github.com/vim/vim/commit/ca48202b6f46cfb40a0d1d80033a2f3e8cb7b813 Author: shane.xb.qian <shane.qian@foxmail.com> Date: Wed Nov 8 21:59:15 2023 +0100 runtime(termdebug): improve window handling, shorten var types closes https://github.com/vim/vim/issues/13474 Signed-off-by: shane.xb.qian <shane.qian@foxmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Wed, 08 Nov 2023 22:15:03 +0100
parents 55e587f6b02f
children 0839c759c9d1
line wrap: on
line diff
--- a/src/testdir/test_termdebug.vim
+++ b/src/testdir/test_termdebug.vim
@@ -80,6 +80,34 @@ func Test_termdebug_basic()
         \  'priority': 110, 'group': 'TermDebug'}],
         \ sign_getplaced('', #{group: 'TermDebug'})[0].signs)})
   Continue
+
+  let cn = 0
+  " 60 is approx spaceBuffer * 3
+  if winwidth(0) <= 78 + 60
+    Var
+    call assert_equal(winnr(), winnr('$'))
+    call assert_equal(winlayout(), ['col', [['leaf', 1002], ['leaf', 1001], ['leaf', 1000], ['leaf', 1003 + cn]]])
+    let cn += 1
+    bw!
+    Asm
+    call assert_equal(winnr(), winnr('$'))
+    call assert_equal(winlayout(), ['col', [['leaf', 1002], ['leaf', 1001], ['leaf', 1000], ['leaf', 1003 + cn]]])
+    let cn += 1
+    bw!
+  endif
+  set columns=160
+  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!
+  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!
+  set columns&
+
   wincmd t
   quit!
   redraw!