0

If I open a file in Vim and then run :Vex (or :Sex) it opens netrw in both the new split and the existing split. This happens even if I have unsaved changes, meaning the changes are lost.

The behaviour I'm used to is for netrw to only open in the new split.

I started noticing this today and I'm not sure what's causing it. It isn't my .vimrc as it happens without any config. It could be that netrw or something else has updated as I have been messing around with Homebrew.

File open in Vim

Then I run :Vex

netrw opens in both splits

5
  • Could you share the version of Vim you are using :version? Can you reproduce the problem in absence of plugins :vim -clean or with a bare version of Vim :vim -i NONE -u NONE? I can't reproduce your problem at first glance it looks like a bug in Vim? May 8, 2023 at 20:28
  • 1
    It's Vim version 9.0 installed via Homebrew. I've just tried uninstalling and just using the system Vim (version 8.2) and that works fine. When using vim --clean or vim -i NONE -u NONE, :Vex isn't a recognised command. May 8, 2023 at 20:42
  • Can you tell us the patch nb of your version :version? May 8, 2023 at 20:46
  • 1
    It doesn’t look this has been resolved, so the custom close reason isn’t appropriate. I’m voting to leave open. Hadrian, I do remember seeing some netrw issues in the mailing list recently. Can you share your exact version (patch number) and see if it’s related to those issues?
    – D. Ben Knoble
    May 9, 2023 at 12:25
  • Thank you D. Ben Knoble, it's version 9.0 with Included patches: 1-1500. It does appear to be this issue -- a user has posted the fix but it doesn't appear to have been patched just yet. May 9, 2023 at 21:28

2 Answers 2

1

That was fixed in Vim Commit: b7398fe, so you should update to Vim >= v9.0.1556

4

This is caused by a bug introduced in version 9.0.1479 which hasn't been patched yet.

This Github comment offers a manual fix for the meantime: https://github.com/vim/vim/issues/12304

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.