fix(new-tutor): set buftype to 'nowrite' instead of 'nofile'#18613
fix(new-tutor): set buftype to 'nowrite' instead of 'nofile'#18613brianhuster wants to merge 1 commit intovim:masterfrom
Conversation
Problem: After I have opened the tutor with `:Tutor`, then I close its window with `:q`, then if I run `:Tutor` to open the tutor again, it will open an empty buffer instead of the tutor content. This is a very confusing behavior. Solution: I believe the point of `set buftype=nofile` is just to prevent users from accidentally writing changes to the tutor file, so why not use `nowrite` instead?
|
I can't reproduce it with the steps provided. |
|
However if you Or just do I believe a better solution might be to come up with |
|
If you add Together with |
|
Well, it needs to be smarter: it should know what tutorial was loaded into the buffer and read it back within PS, original tutorial ftw :) |
This is what I was trying to solve.
Tutor is not a part of anyone's workflow, so I don't want to put too much time on it. I also support removing the new tutor btw. But until then, to avoid confusion to users, it should at least be reliable |
|
Thanks. Let's also make it |
@chrisbra Why doesn't Also, you have not explained that change in the commit message. |
Try yourself:
Indeed, but now it is set in stone 🤷 |
Problem: :Tutor may not work as expected
Solution: set buftype=nowrite instead of nofile
(Phạm Bình An)
closes: vim/vim#18613
vim/vim@9978bb7
Co-authored-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Problem: :Tutor may not work as expected
Solution: set buftype=nowrite instead of nofile
(Phạm Bình An)
closes: vim/vim#18613
vim/vim@9978bb7
Co-authored-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Problem: :Tutor may not work as expected
Solution: set buftype=nowrite instead of nofile
(Phạm Bình An)
closes: vim/vim#18613
vim/vim@9978bb7
Co-authored-by: Phạm Bình An <phambinhanctb2004@gmail.com>
(cherry picked from commit fb6fd17)
Problem: :Tutor may not work as expected
Solution: set buftype=nowrite instead of nofile
(Phạm Bình An)
closes: vim/vim#18613
vim/vim@9978bb7
Co-authored-by: Phạm Bình An <phambinhanctb2004@gmail.com>
(cherry picked from commit fb6fd17)
Problem:
After I have opened the tutor with
:Tutor, then I close its window with:q, then if I run:Tutorto open the tutor again, it will open an empty buffer instead of the tutor content. This is a very confusing behavior.Related issue neovim/neovim#36228
Solution:
I believe the point of
set buftype=nofileis just to prevent users from accidentally writing changes to the tutor file, so why not usenowriteinstead?