patch 9.1.1870: :Tutor may not work as expected

Commit: 
https://github.com/vim/vim/commit/9978bb77c68c2afa056b7c1ec0fa9d9648cb1960
Author: Phạm Bình An <[email protected]>
Date:   Sat Oct 25 03:31:27 2025 +0000

    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 <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/autoload/tutor.vim b/runtime/autoload/tutor.vim
index b21e20f81..c3b5df37d 100644
--- a/runtime/autoload/tutor.vim
+++ b/runtime/autoload/tutor.vim
@@ -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()
diff --git a/src/testdir/test_plugin_tutor.vim 
b/src/testdir/test_plugin_tutor.vim
index da97fcf5c..65371ca06 100644
--- a/src/testdir/test_plugin_tutor.vim
+++ b/src/testdir/test_plugin_tutor.vim
@@ -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
diff --git a/src/version.c b/src/version.c
index 3001dbd1c..2d768c8f8 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1870,
 /**/
     1869,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1vCe6u-001Yp4-4m%40256bit.org.

Raspunde prin e-mail lui