comparison src/testdir/test_man.vim @ 17470:d2a834aa7cc0 v8.1.1733

patch 8.1.1733: the man ftplugin leaves an empty buffer behind commit https://github.com/vim/vim/commit/e5e6950193ddf365c6c507ddefcd7f9db939e5ac Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jul 22 22:09:21 2019 +0200 patch 8.1.1733: the man ftplugin leaves an empty buffer behind Problem: The man ftplugin leaves an empty buffer behind. Solution: Don't make new window and edit, use split. (Jason Franklin)
author Bram Moolenaar <Bram@vim.org>
date Mon, 22 Jul 2019 22:15:04 +0200
parents ccbb8e393d80
children d9aa921b7198
comparison
equal deleted inserted replaced
17469:30eb99624cdd 17470:d2a834aa7cc0
44 call assert_inrange(l:w - 2, l:w + 2, winwidth(1)) 44 call assert_inrange(l:w - 2, l:w + 2, winwidth(1))
45 call assert_inrange(l:h - 1, l:h + 1, winheight(1)) 45 call assert_inrange(l:h - 1, l:h + 1, winheight(1))
46 call assert_equal(2, tabpagenr('$')) 46 call assert_equal(2, tabpagenr('$'))
47 call assert_equal(2, tabpagenr()) 47 call assert_equal(2, tabpagenr())
48 q 48 q
49
50 unlet g:ft_man_open_mode
49 endfunction 51 endfunction
50 52
51 function Test_nomodifiable() 53 function Test_nomodifiable()
52 let wincnt = winnr('$') 54 let wincnt = winnr('$')
53 Man vim 55 Man vim
56 return 58 return
57 endif 59 endif
58 call assert_false(&l:modifiable) 60 call assert_false(&l:modifiable)
59 q 61 q
60 endfunction 62 endfunction
63
64 function Test_buffer_count_hidden()
65 %bw!
66 set hidden
67
68 call assert_equal(1, len(getbufinfo()))
69
70 let wincnt = winnr('$')
71 Man vim
72 if wincnt == winnr('$')
73 " Vim manual page cannot be found.
74 return
75 endif
76
77 call assert_equal(1, len(getbufinfo({'buflisted':1})))
78 call assert_equal(2, len(getbufinfo()))
79 q
80
81 Man vim
82
83 call assert_equal(1, len(getbufinfo({'buflisted':1})))
84 call assert_equal(2, len(getbufinfo()))
85 q
86
87 set hidden&
88 endfunction