]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(netrw): do not pollute search history with symlinks
authorChristian Brabandt <cb@256bit.org>
Thu, 12 Dec 2024 18:13:08 +0000 (19:13 +0100)
committerChristian Brabandt <cb@256bit.org>
Thu, 12 Dec 2024 18:13:08 +0000 (19:13 +0100)
fixes: #16206

Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/autoload/netrw.vim

index b90a8d672f165ed108634ca0ad27c68594419733..b0dfd823c7f7965a5b22ef13d7165fe23d69c103 100644 (file)
@@ -40,6 +40,7 @@
 "   2024 Nov 23 by Vim Project: fix powershell escaping issues (#16094)
 "   2024 Dec 04 by Vim Project: do not detach for gvim (#16168)
 "   2024 Dec 08 by Vim Project: check the first arg of netrw_browsex_viewer for being executable (#16185)
+"   2024 Dec 12 by Vim Project: do not pollute the search history (#16206)
 "   }}}
 " Former Maintainer:   Charles E Campbell
 " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
@@ -11774,7 +11775,8 @@ endfun
 " s:ShowLink: used to modify thin and tree listings to show links {{{2
 fun! s:ShowLink()
   if exists("b:netrw_curdir")
-   norm! $?\a
+   keepp :norm! $?\a
+   "call histdel("/",-1)
    if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treetop")
     let basedir = s:NetrwTreePath(w:netrw_treetop)
    else