Skip to content

netrw syncs its windows/buffers while in same folder #20059

@bugsbugsbux

Description

@bugsbugsbux

Steps to reproduce

Problem:

When you open multiple netrw instances and navigate to the same folder,
they sync their settings (and even buffer id? they all close in this situation
when calling :bd) until you navigate to a different folder in one of the windows.

Steps:

  • :packadd netrw if necessary
  • :Explore | Vexplore
  • i all windows change style
  • :bd closes all netrw windows
  • :Explore . | Vexplore ..
  • i only changes style of current window
  • :bd only closes current netrw instance, following assumes you did not do that now
  • navigate to same folder as other window
  • -> styles immediately synced, windows coupled again: try i
  • navigate to another folder in one window
  • -> not synced anymore: try i

When using tree-view it's especially bothersome, because when the windows sync
and you navigate to another folder in one window, the other one scrolls out of
view.

Expected behaviour

instances should stay independent even when in same folder

do not scroll out of view when using tree style

Version of Vim

VIM - Vi IMproved 9.2 (2026 Feb 14, compiled Apr 22 2026 17:02:04) Included patches: 1-388 Compiled by Arch Linux Huge version without GUI. Features included (+) or not (-): +acl +file_in_path +mouse_xterm -tag_any_white +arabic +find_in_path +multi_byte +tcl/dyn +autocmd +float +multi_lang +termguicolors +autochdir +folding -mzscheme +terminal -autoservername -footer +netbeans_intg +terminfo -balloon_eval +fork() +num64 +termresponse +balloon_eval_term +gettext +packages +textobjects -browse -hangul_input +path_extra +textprop ++builtin_terms +iconv +perl/dyn +timers +byte_offset +insert_expand +persistent_undo +title +channel +ipv6 +popupwin -toolbar +cindent +job +postscript +user_commands +clientserver +jumplist +printer +vartabs -clipboard +keymap +profile +vertsplit +clipboard_provider +lambda -python +vim9script +cmdline_compl +langmap +python3/dyn +viminfo +cmdline_hist +libcall +quickfix +virtualedit +cmdline_info +linebreak +reltime +visual +comments +lispindent +rightleft +visualextra +conceal +listcmds +ruby/dyn +vreplace +cryptv +localmap +scrollbind -wayland +cscope +lua/dyn +signs -wayland_clipboard +cursorbind +menu +smartindent +wildignore +cursorshape +mksession +socketserver +wildmenu +dialog_con +modify_fname -sodium +windows +diff +mouse -sound +writebackup +digraphs -mouseshape +spell -X11 -dnd +mouse_dec +startuptime +xattr -ebcdic +mouse_gpm +statusline -xfontset +emacs_tags -mouse_jsbterm -sun_workshop -xim +eval +mouse_netterm +syntax -xpm +ex_extra +mouse_sgr +tabpanel -xsmp +extra_search -mouse_sysmouse +tag_binary -xterm_clipboard -farsi +mouse_urxvt -tag_old_static -xterm_save system vimrc file: "/etc/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "/.vim/vimrc" 3rd user vimrc file: "/.config/vim/vimrc" user exrc file: "$HOME/.exrc" defaults file: "$VIMRUNTIME/defaults.vim" fall-back for $VIM: "/usr/share/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/vim/src=/usr/src/debug/vim -flto=auto -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto -L/usr/local/lib -o vim -lm -ltinfo -lnsl -lacl -lattr -lgpm -L/usr/lib -ltclstub8.6 -ldl -lz -lpthread -lm

Environment

archlinux, installed via archlinux package,

terminal: foot version: 1.26.1 +pgo +ime +graphemes +toplevel-tag +blur -assertions

in tmux: tmux 3.6a

$TERM: tmux-256color

nvim behaves the same, not thoroughly tested tho
NVIM v0.12.2 Build type: RelWithDebInfo LuaJIT 2.1.1774896198

vim and nvim both called with --clean

Logs and stack traces

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions