4

I am running VIM version 8.2.501 with netrw v168 and I have spotted the following issue. In some cases nested directories appear as files and not as directories. This happens in a few use cases but the following one is a way to reproduce it.

  • Set netrw to use tree style i.e. set let g:netrw_liststyle = 3 in your .vimrc
  • Open netrw :e.
  • Open a nested directory

enter image description here

  • Press i to toggle modes until you return to tree view
  • You can't see all directories and directories appear as files (you can't expand them anymore)

enter image description here

After that, I can't close the netrw buffer with <c-6>. Refreshing the buffer <c-l> or toggling modes again does not fix the issue either. The only way to have your directories again is to close and open the directories above e.g. close/open foo will make foo1 appear again then close/open foo1 will make foo2 appear again etc.

Anyone else with this problem? Any fixes?

P.S. I observed that this can also happen when you create a new directory. The buffer refreshes and other directories appear as files. Looks like this view has a lot of bugs

George B.
  • 565
  • 7
  • 19
  • I noticed the same thing when I'm looking a directory in tree view, then switch to another program, then switch back to Vim. Are you using gVim or MacVim perchance? – Big McLargeHuge Sep 03 '20 at 23:43
  • Also see https://www.reddit.com/r/neovim/comments/euxwou/netrw_strange_behavior_in_tree_view/ – Big McLargeHuge Sep 03 '20 at 23:46
  • I am using vim (terminal/Linux) – George B. Sep 04 '20 at 08:51
  • I noticed the same problem with terminator in Ubuntu. Once I switched to another tab and then switched back, what used to be normal directories became files. And I need to close and open the parent directory in netrw to get it back to normal – hzh Jun 24 '21 at 17:26
  • I am definitely seeing this in MacVim almost 3 years later. – Michael Mar 08 '23 at 17:09

0 Answers0