patch 9.0.0708: :confirm does not work properly for a terminal buffer

Problem:    :confirm does not work properly for a terminal buffer.
Solution:   Handle :confirm for a terminal buffer differently.  (Yee Cheng
            Chin, closes #11312)
This commit is contained in:
Yee Cheng Chin
2022-10-09 18:53:32 +01:00
committed by Bram Moolenaar
parent 118c235112
commit 15b314ffbb
8 changed files with 242 additions and 36 deletions

View File

@ -129,6 +129,12 @@ an <silent> 10.330 &File.&Close<Tab>:close
\ else <Bar>
\ confirm close <Bar>
\ endif<CR>
tln <silent> 10.330 &File.&Close<Tab>:close
\ <C-W>:if winheight(2) < 0 && tabpagewinnr(2) == 0 <Bar>
\ confirm enew <Bar>
\ else <Bar>
\ confirm close <Bar>
\ endif<CR>
an 10.335 &File.-SEP1- <Nop>
an <silent> 10.340 &File.&Save<Tab>:w :if expand("%") == ""<Bar>browse confirm w<Bar>else<Bar>confirm w<Bar>endif<CR>
an 10.350 &File.Save\ &As\.\.\.<Tab>:sav :browse confirm saveas<CR>