comparison runtime/autoload/netrw.vim @ 25773:11b656e74444

Update runtime files Commit: https://github.com/vim/vim/commit/6c391a74fe90190796ca0b0c010112948a6e75d7 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 9 21:55:11 2021 +0200 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Thu, 09 Sep 2021 22:00:10 +0200
parents d4faa2c5211b
children 9c221ad9634a
comparison
equal deleted inserted replaced
25772:55753c17b73d 25773:11b656e74444
4265 " call Decho(" lookup netrwbuf dictionary: s:netrwbuf[".s:NetrwFullPath(dirname)."] not a key",'~'.expand("<slnum>")) 4265 " call Decho(" lookup netrwbuf dictionary: s:netrwbuf[".s:NetrwFullPath(dirname)."] not a key",'~'.expand("<slnum>"))
4266 let bufnum= -1 4266 let bufnum= -1
4267 endif 4267 endif
4268 " call Decho(" bufnum#".bufnum,'~'.expand("<slnum>")) 4268 " call Decho(" bufnum#".bufnum,'~'.expand("<slnum>"))
4269 4269
4270 " highjack the current buffer 4270 " hijack the current buffer
4271 " IF the buffer already has the desired name 4271 " IF the buffer already has the desired name
4272 " AND it is empty 4272 " AND it is empty
4273 let curbuf = bufname("%") 4273 let curbuf = bufname("%")
4274 if curbuf == '.' 4274 if curbuf == '.'
4275 let curbuf = getcwd() 4275 let curbuf = getcwd()
4276 endif 4276 endif
4277 " call Dredir("ls!","NetrwGetFile (renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">)") 4277 " call Dredir("ls!","NetrwGetFile (renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">)")
4278 " call Decho("deciding if netrw may highjack the current buffer#".bufnr("%")."<".curbuf.">",'~'.expand("<slnum>")) 4278 " call Decho("deciding if netrw may hijack the current buffer#".bufnr("%")."<".curbuf.">",'~'.expand("<slnum>"))
4279 " call Decho("..dirname<".dirname."> IF dirname == bufname",'~'.expand("<slnum>")) 4279 " call Decho("..dirname<".dirname."> IF dirname == bufname",'~'.expand("<slnum>"))
4280 " call Decho("..curbuf<".curbuf.">",'~'.expand("<slnum>")) 4280 " call Decho("..curbuf<".curbuf.">",'~'.expand("<slnum>"))
4281 " call Decho("..line($)=".line("$")." AND this is 1",'~'.expand("<slnum>")) 4281 " call Decho("..line($)=".line("$")." AND this is 1",'~'.expand("<slnum>"))
4282 " call Decho("..getline(%)<".getline("%")."> AND this line is empty",'~'.expand("<slnum>")) 4282 " call Decho("..getline(%)<".getline("%")."> AND this line is empty",'~'.expand("<slnum>"))
4283 if dirname == curbuf && line("$") == 1 && getline("%") == "" 4283 if dirname == curbuf && line("$") == 1 && getline("%") == ""
4284 " call Dret("s:NetrwGetBuffer 0<cleared buffer> : highjacking buffer#".bufnr("%")) 4284 " call Dret("s:NetrwGetBuffer 0<cleared buffer> : highjacking buffer#".bufnr("%"))
4285 return 0 4285 return 0
4286 else " DEBUG 4286 else " DEBUG
4287 " call Decho("..did NOT highjack buffer",'~'.expand("<slnum>")) 4287 " call Decho("..did NOT hijack buffer",'~'.expand("<slnum>"))
4288 endif 4288 endif
4289 " Aug 14, 2021: was thinking about looking for a [No Name] buffer here and using it, but that might cause problems 4289 " Aug 14, 2021: was thinking about looking for a [No Name] buffer here and using it, but that might cause problems
4290 4290
4291 " get enew buffer and name it -or- re-use buffer {{{3 4291 " get enew buffer and name it -or- re-use buffer {{{3
4292 if bufnum < 0 " get enew buffer and name it 4292 if bufnum < 0 " get enew buffer and name it
6843 " call Dfunc("s:NetrwMarkFile(islocal=".a:islocal." fname<".a:fname.">)") 6843 " call Dfunc("s:NetrwMarkFile(islocal=".a:islocal." fname<".a:fname.">)")
6844 " call Decho("bufnr(%)=".bufnr("%").": ".bufname("%"),'~'.expand("<slnum>")) 6844 " call Decho("bufnr(%)=".bufnr("%").": ".bufname("%"),'~'.expand("<slnum>"))
6845 6845
6846 " sanity check 6846 " sanity check
6847 if empty(a:fname) 6847 if empty(a:fname)
6848 " call Dret("s:NetrwMarkFile : emtpy fname") 6848 " call Dret("s:NetrwMarkFile : empty fname")
6849 return 6849 return
6850 endif 6850 endif
6851 let curdir = s:NetrwGetCurdir(a:islocal) 6851 let curdir = s:NetrwGetCurdir(a:islocal)
6852 6852
6853 let ykeep = @@ 6853 let ykeep = @@