runtime(netrw): fix remaining case of register clobber
complements 62f7b55c1a
closes: #15114
Signed-off-by: Enno <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@ -15,7 +15,7 @@
|
|||||||
" 2024 May 13 by Vim Project: prefer scp over pscp
|
" 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)
|
" 2024 Jun 04 by Vim Project: set bufhidden if buffer changed, nohidden is set and buffer shall be switched (#14915)
|
||||||
" 2024 Jun 13 by Vim Project: glob() on Windows fails when a directory name contains [] (#14952)
|
" 2024 Jun 13 by Vim Project: glob() on Windows fails when a directory name contains [] (#14952)
|
||||||
" 2024 Jun 23 by Vim Project: save ad restore registers when liststyle = WIDELIST (#15077)
|
" 2024 Jun 23 by Vim Project: save ad restore registers when liststyle = WIDELIST (#15077, #15114)
|
||||||
" Former Maintainer: Charles E Campbell
|
" Former Maintainer: Charles E Campbell
|
||||||
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
|
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
|
||||||
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
|
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
|
||||||
@ -4497,7 +4497,15 @@ fun! s:NetrwGetWord()
|
|||||||
call cursor(line("."),filestart+1)
|
call cursor(line("."),filestart+1)
|
||||||
NetrwKeepj norm! ma
|
NetrwKeepj norm! ma
|
||||||
endif
|
endif
|
||||||
let rega= @a
|
|
||||||
|
let dict={}
|
||||||
|
" save the unnamed register and register 0-9 and a
|
||||||
|
let dict.a=[getreg('a'), getregtype('a')]
|
||||||
|
for i in range(0, 9)
|
||||||
|
let dict[i] = [getreg(i), getregtype(i)]
|
||||||
|
endfor
|
||||||
|
let dict.unnamed = [getreg(''), getregtype('')]
|
||||||
|
|
||||||
let eofname= filestart + b:netrw_cpf + 1
|
let eofname= filestart + b:netrw_cpf + 1
|
||||||
if eofname <= col("$")
|
if eofname <= col("$")
|
||||||
call cursor(line("."),filestart+b:netrw_cpf+1)
|
call cursor(line("."),filestart+b:netrw_cpf+1)
|
||||||
@ -4505,8 +4513,10 @@ fun! s:NetrwGetWord()
|
|||||||
else
|
else
|
||||||
NetrwKeepj norm! "ay$
|
NetrwKeepj norm! "ay$
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let dirname = @a
|
let dirname = @a
|
||||||
let @a = rega
|
call s:RestoreRegister(dict)
|
||||||
|
|
||||||
" call Decho("2: dirname<".dirname.">",'~'.expand("<slnum>"))
|
" call Decho("2: dirname<".dirname.">",'~'.expand("<slnum>"))
|
||||||
let dirname= substitute(dirname,'\s\+$','','e')
|
let dirname= substitute(dirname,'\s\+$','','e')
|
||||||
" call Decho("3: dirname<".dirname.">",'~'.expand("<slnum>"))
|
" call Decho("3: dirname<".dirname.">",'~'.expand("<slnum>"))
|
||||||
|
|||||||
Reference in New Issue
Block a user