comparison src/testdir/test_messages.vim @ 29546:8a243ecfe2dd v9.0.0114

patch 9.0.0114: the command line takes up space even when not used Commit: https://github.com/vim/vim/commit/f39cfb72629f3e7fefaf578a3faa2619cd0654f8 Author: Shougo Matsushita <Shougo.Matsu@gmail.com> Date: Sat Jul 30 16:54:05 2022 +0100 patch 9.0.0114: the command line takes up space even when not used Problem: The command line takes up space even when not used. Solution: Allow for 'cmdheight' to be set to zero. (Shougo Matsushita, closes #10675, closes #940)
author Bram Moolenaar <Bram@vim.org>
date Sat, 30 Jul 2022 18:00:03 +0200
parents e988bbf50e09
children d413dccd4f8a
comparison
equal deleted inserted replaced
29545:b544e30ddc6c 29546:8a243ecfe2dd
385 call StopVimInTerminal(buf) 385 call StopVimInTerminal(buf)
386 call delete('Xtest_fileinfo_after_echo') 386 call delete('Xtest_fileinfo_after_echo')
387 call delete('b.txt') 387 call delete('b.txt')
388 endfunc 388 endfunc
389 389
390 func Test_cmdheight_zero()
391 set cmdheight=0
392 set showcmd
393 redraw!
394
395 echo 'test echo'
396 call assert_equal(116, screenchar(&lines, 1))
397 redraw!
398
399 echomsg 'test echomsg'
400 call assert_equal(116, screenchar(&lines, 1))
401 redraw!
402
403 call feedkeys(":ls\<CR>", "xt")
404 call assert_equal(':ls', Screenline(&lines - 1))
405 redraw!
406
407 let char = getchar(0)
408 call assert_match(char, 0)
409
410 " Check change/restore cmdheight when macro
411 call feedkeys("qa", "xt")
412 call assert_equal(&cmdheight, 1)
413 call feedkeys("q", "xt")
414 call assert_equal(&cmdheight, 0)
415
416 call setline(1, 'somestring')
417 call feedkeys("y", "n")
418 %s/somestring/otherstring/gc
419 call assert_equal(getline(1), 'otherstring')
420
421 call feedkeys("g\<C-g>", "xt")
422 call assert_match(
423 \ 'Col 1 of 11; Line 1 of 1; Word 1 of 1',
424 \ Screenline(&lines))
425
426 " Check split behavior
427 for i in range(1, 10)
428 split
429 endfor
430 only
431 call assert_equal(&cmdheight, 0)
432
433 set cmdheight&
434 set showcmd&
435 endfunc
436
390 " vim: shiftwidth=2 sts=2 expandtab 437 " vim: shiftwidth=2 sts=2 expandtab