mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:98b73eb: runtime(netrw): prevent accidental data loss
fixes: vim/vim#14915
98b73eb645
Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
230bc34ca5
commit
946a839aa9
@ -12,6 +12,8 @@
|
||||
" 2024 May 08 by Vim Project: cleanup legacy Win9X checks
|
||||
" 2024 May 09 by Vim Project: remove hard-coded private.ppk
|
||||
" 2024 May 10 by Vim Project: recursively delete directories by default
|
||||
" 2024 May 13 by Vim Project: prefer scp over pscp
|
||||
" 2024 Jun 04 by Vim Project: set bufhidden if buffer changed, nohidden is set and buffer shall be switched (#14915)
|
||||
" Former Maintainer: Charles E Campbell
|
||||
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
|
||||
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
|
||||
@ -5681,6 +5683,9 @@ fun! s:NetrwEditFile(cmd,opt,fname)
|
||||
exe "NetrwKeepj keepalt ".a:opt." ".a:cmd." ".fnameescape(a:fname)
|
||||
else
|
||||
" call Decho("exe NetrwKeepj ".a:opt." ".a:cmd." ".fnameescape(a:fname))
|
||||
if a:cmd =~# 'e\%[new]!' && !&hidden && getbufvar(bufname('%'), '&modified', 0)
|
||||
call setbufvar(bufname('%'), '&bufhidden', 'hide')
|
||||
endif
|
||||
exe "NetrwKeepj ".a:opt." ".a:cmd." ".fnameescape(a:fname)
|
||||
endif
|
||||
" call Dret("s:NetrwEditFile")
|
||||
|
Loading…
Reference in New Issue
Block a user