comparison src/testdir/test_cmdline.vim @ 18467:99fc29219b3e v8.1.2227

patch 8.1.2227: layout wrong if 'lines' changes while cmdline window is open Commit: https://github.com/vim/vim/commit/1c329c04be2e95a3589a53f2978926e91b450cca Author: Bram Moolenaar <Bram@vim.org> Date: Sun Oct 27 20:37:35 2019 +0100 patch 8.1.2227: layout wrong if 'lines' changes while cmdline window is open Problem: Layout wrong if 'lines' changes while cmdline window is open. Solution: Do not restore the window layout if 'lines' changed. (closes #5130)
author Bram Moolenaar <Bram@vim.org>
date Sun, 27 Oct 2019 20:45:03 +0100
parents 18d7337b6837
children baf890fa1621
comparison
equal deleted inserted replaced
18466:0a0e391c6d59 18467:99fc29219b3e
766 catch /^Vim\%((\a\+)\)\=:E11/ 766 catch /^Vim\%((\a\+)\)\=:E11/
767 endtry 767 endtry
768 bw! 768 bw!
769 endfunc 769 endfunc
770 770
771 func Test_cmdwin_restore()
772 CheckScreendump
773
774 let lines =<< trim [SCRIPT]
775 call setline(1, range(30))
776 2split
777 [SCRIPT]
778 call writefile(lines, 'XTest_restore')
779
780 let buf = RunVimInTerminal('-S XTest_restore', {'rows': 12})
781 call term_wait(buf, 100)
782 call term_sendkeys(buf, "q:")
783 call VerifyScreenDump(buf, 'Test_cmdwin_restore_1', {})
784
785 " normal restore
786 call term_sendkeys(buf, ":q\<CR>")
787 call VerifyScreenDump(buf, 'Test_cmdwin_restore_2', {})
788
789 " restore after setting 'lines' with one window
790 call term_sendkeys(buf, ":close\<CR>")
791 call term_sendkeys(buf, "q:")
792 call term_sendkeys(buf, ":set lines=18\<CR>")
793 call term_sendkeys(buf, ":q\<CR>")
794 call VerifyScreenDump(buf, 'Test_cmdwin_restore_3', {})
795
796 " clean up
797 call StopVimInTerminal(buf)
798 call delete('XTest_restore')
799 endfunc
800
771 func Test_buffers_lastused() 801 func Test_buffers_lastused()
772 " check that buffers are sorted by time when wildmode has lastused 802 " check that buffers are sorted by time when wildmode has lastused
773 call test_settime(1550020000) " middle 803 call test_settime(1550020000) " middle
774 edit bufa 804 edit bufa
775 enew 805 enew