nerdtree icon indicating copy to clipboard operation
nerdtree copied to clipboard

Files do not appear in the folder.

Open dgorodnichybak opened this issue 10 years ago • 14 comments

Hello. Files do not hidden, but when I open folder it looks empty. When I explore empty dir, files displayed (right column on attached image). After reloading vim files are displayed.

2fd1773ad3

dgorodnichybak avatar Dec 29 '15 10:12 dgorodnichybak

Update: This only happens after I press "x" on folder.

dgorodnichybak avatar Dec 30 '15 14:12 dgorodnichybak

+1 same issue

chrisyue avatar Jan 12 '16 08:01 chrisyue

+1 the same problem

igkuz avatar Jan 12 '16 16:01 igkuz

+1 Same problem

richardhartme avatar Jan 18 '16 11:01 richardhartme

+1 Same problem

iamcco avatar Mar 08 '16 02:03 iamcco

Duplicate: #519 Same issue.

athallas avatar Mar 11 '16 10:03 athallas

The problem still exists.

noscripter avatar Jan 07 '17 12:01 noscripter

I experience this bug when I go up twice from a directory that is a single item in its parent directory.

For example (as shown on OP's screenshot), I open vim from directory controllers/admin. Then I press 'u'. And then I press 'u' again. At this step I see the directory structure like on the screenshot (>controllers/admin). And I'm not able to view the contents of controllers/admin even if I press 'R' or 'r'.

#519 is a bit different issue. I have updated to the latest version at the moment.

mzavoloka avatar Jun 29 '17 11:06 mzavoloka

mkdir ttt mkdir ttt/ttt/ touch ttt/ttt/test cd ttt/ttt/ vim test

Inside vim: :NERDTreeToggle u u And now you're not able to view the contents of folder ttt/ttt.

mzavoloka avatar Jun 29 '17 11:06 mzavoloka

I can now replicate this bug, and I believe it to be confirmed. Replicate with these steps:

  1. Point the NERDTree root to a directory that will cascade beneath its parent.
  2. Press u twice.
  3. Note that the cascaded directory will no longer open.

You can do this in the NERDTree repository itself by making the root nerdtree/lib/nerdtree/ pressing u twice, and then trying to open lib/nerdtree/ again.

Bug confirmed.

lifecrisis avatar Jun 29 '17 12:06 lifecrisis

Look at the NERDTreeCascadeSingleChildDir option. When set to 1, the default, I see the behavior described in this issue. A workaround is to set it to 0.

PhilRunninger avatar Jun 29 '17 12:06 PhilRunninger

Hey, @PhilRunninger, I think I've got this one. A possible duplicate is issue #547. I also have a fix in progress. I believe the problem can be captured in a few words as follows:

When you make a directory that belongs to a cascade the NERDTree root, pressing u repeatedly will close every directory in the chain along the way up. Then, when you try to open the cascaded node with o, the mapping opens the lowest directory node in the cascade while leaving the ancestor nodes closed. That is, the mappings are operating on the tail of the cascade, not the immediate child of the current root node.

The rendering logic never reaches the open node at the bottom of the cascade, and the children there cannot be displayed because their ancestors are "closed" from the point of view of the NERDTree. This also explains why the open/closed status indicator (+ or ~ on Windows) changes while the children never render.

lifecrisis avatar Jun 29 '17 23:06 lifecrisis

ANNOUNCEMENT: Everyone experiencing this bug can try the fix in pull request #720. It should repair this problem without any side effects. The code is currently under review.

lifecrisis avatar Jul 02 '17 16:07 lifecrisis

Works for me, thx.

mzavoloka avatar Jul 02 '17 18:07 mzavoloka