mirror of
https://github.com/neovim/neovim.git
synced 2025-10-18 07:41:51 +00:00
vim-patch:9e100b8: runtime(netrw): only keep cursor position in tree listing mode
fixes: vim/vim#16255
closes: vim/vim#18275
9e100b8d14
Co-authored-by: Tom Benham <tom.benham13@gmail.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
" 2025 Aug 07 by Vim Project (netrw#BrowseX() distinguishes remote files #17794)
|
" 2025 Aug 07 by Vim Project (netrw#BrowseX() distinguishes remote files #17794)
|
||||||
" 2025 Aug 22 by Vim Project netrw#Explore handle terminal correctly #18069
|
" 2025 Aug 22 by Vim Project netrw#Explore handle terminal correctly #18069
|
||||||
" 2025 Sep 05 by Vim Project ensure netrw#fs#Dirname() returns trailing slash #18199
|
" 2025 Sep 05 by Vim Project ensure netrw#fs#Dirname() returns trailing slash #18199
|
||||||
|
" 2025 Sep 11 by Vim Project only keep cursor position in tree mode #18275
|
||||||
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
|
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
|
||||||
" Permission is hereby granted to use and distribute this code,
|
" Permission is hereby granted to use and distribute this code,
|
||||||
" with or without modifications, provided that this copyright
|
" with or without modifications, provided that this copyright
|
||||||
@@ -3083,7 +3084,7 @@ function s:NetrwBrowse(islocal,dirname)
|
|||||||
" previous buffer
|
" previous buffer
|
||||||
let prevbufnr = bufnr('%')
|
let prevbufnr = bufnr('%')
|
||||||
let reusing= s:NetrwGetBuffer(a:islocal,dirname)
|
let reusing= s:NetrwGetBuffer(a:islocal,dirname)
|
||||||
if exists("s:rexposn_".prevbufnr)
|
if exists("s:rexposn_".prevbufnr) && exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
|
||||||
let s:rexposn_{bufnr('%')} = s:rexposn_{prevbufnr}
|
let s:rexposn_{bufnr('%')} = s:rexposn_{prevbufnr}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user