]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1870: :Tutor may not work as expected v9.1.1870
authorPhạm Bình An <phambinhanctb2004@gmail.com>
Sat, 25 Oct 2025 03:31:27 +0000 (03:31 +0000)
committerChristian Brabandt <cb@256bit.org>
Sat, 25 Oct 2025 03:33:12 +0000 (03:33 +0000)
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>
runtime/autoload/tutor.vim
src/testdir/test_plugin_tutor.vim
src/version.c

index b21e20f814defc9405f3274ae46f79f097e0fb8a..c3b5df37d941d3f47b75ec25cc99312d797b155e 100644 (file)
@@ -211,7 +211,7 @@ function! tutor#TutorCmd(tutor_name)
     endif
 
     call tutor#SetupVim()
-    exe "edit ".l:to_open
+    exe "drop ".l:to_open
     call tutor#EnableInteractive(v:true)
 endfunction
 
@@ -225,7 +225,7 @@ endfunction
 function! tutor#EnableInteractive(enable)
     let enable = a:enable
     if enable
-        setlocal buftype=nofile
+        setlocal buftype=nowrite
         setlocal concealcursor+=inv
         setlocal conceallevel=2
         call tutor#ApplyMarks()
index da97fcf5c491b980b075c41fad6e5bbda1ca6839..65371ca069af495efbab5c9f648870123af4e6b8 100644 (file)
@@ -10,7 +10,7 @@ endfunc
 
 func Test_auto_enable_interactive()
   Tutor
-  call assert_equal('nofile', &buftype)
+  call assert_equal('nowrite', &buftype)
   call assert_match('tutor#EnableInteractive', b:undo_ftplugin)
 
   edit Xtutor/Xtest.tutor
index 3001dbd1c039fc02156b0e6d93c32a40b8a68904..2d768c8f8b4cb6368457220b854a6c2cd7f67961 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1870,
 /**/
     1869,
 /**/