mirror of
https://github.com/vim/vim.git
synced 2025-11-14 23:04:02 -05:00
patch 9.1.1870: :Tutor may not work as expected
Problem: :Tutor may not work as expected
Solution: set buftype=nowrite instead of nofile
(Phạm Bình An)
closes: #18613
Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
0ef50d9d8d
commit
9978bb77c6
@@ -211,7 +211,7 @@ function! tutor#TutorCmd(tutor_name)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
call tutor#SetupVim()
|
call tutor#SetupVim()
|
||||||
exe "edit ".l:to_open
|
exe "drop ".l:to_open
|
||||||
call tutor#EnableInteractive(v:true)
|
call tutor#EnableInteractive(v:true)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ endfunction
|
|||||||
function! tutor#EnableInteractive(enable)
|
function! tutor#EnableInteractive(enable)
|
||||||
let enable = a:enable
|
let enable = a:enable
|
||||||
if enable
|
if enable
|
||||||
setlocal buftype=nofile
|
setlocal buftype=nowrite
|
||||||
setlocal concealcursor+=inv
|
setlocal concealcursor+=inv
|
||||||
setlocal conceallevel=2
|
setlocal conceallevel=2
|
||||||
call tutor#ApplyMarks()
|
call tutor#ApplyMarks()
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ endfunc
|
|||||||
|
|
||||||
func Test_auto_enable_interactive()
|
func Test_auto_enable_interactive()
|
||||||
Tutor
|
Tutor
|
||||||
call assert_equal('nofile', &buftype)
|
call assert_equal('nowrite', &buftype)
|
||||||
call assert_match('tutor#EnableInteractive', b:undo_ftplugin)
|
call assert_match('tutor#EnableInteractive', b:undo_ftplugin)
|
||||||
|
|
||||||
edit Xtutor/Xtest.tutor
|
edit Xtutor/Xtest.tutor
|
||||||
|
|||||||
@@ -734,6 +734,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1870,
|
||||||
/**/
|
/**/
|
||||||
1869,
|
1869,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user