Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Folder icons bug #194

Closed
7 tasks done
ghost opened this issue Feb 20, 2017 · 17 comments
Closed
7 tasks done

Folder icons bug #194

ghost opened this issue Feb 20, 2017 · 17 comments

Comments

@ghost
Copy link

ghost commented Feb 20, 2017

Required Info

  • I have searched the issues for my issue and found nothing related and/or helpful

  • I have read or at least glanced at the FAQ

  • I have read or at least glanced at the Wiki

  • What version of vim are you using?

NVIM 0.1.7
Build type: RelWithDebInfo
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -I/tmp/neovim-20170218-86441-v9u4vo/neovim-0.1.7/build/config -I/tmp/neovim-20170218-86441-v9u4vo/neovim-0.1.7/src -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/include -I/usr/include -I/tmp/neovim-20170218-86441-v9u4vo/neovim-0.1.7/build/src/nvim/auto -I/tmp/neovim-20170218-86441-v9u4vo/neovim-0.1.7/build/include
Compiled by ismay@macbook.local

Optional features included (+) or not (-): +acl   +iconv    +jemalloc +tui
For differences from Vim, see :help vim-differences

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.1.7/share/nvim"
  • What version of vim-devicons are you using?
    0.8.5
  • Are you using vim from the terminal or a GUI vim?
    iTerm2 neovim
  • Are you using Mac, Linux or Windows?
    macos Sierra 10.12.3

When using the folder open/close icons:

  let g:WebDevIconsUnicodeDecorateFolderNodes = 1
  let g:DevIconsEnableFoldersOpenClose = 1

They don't always work as expected.

  1. The top folder icon doesn't open/close:

screen shot 2017-02-20 at 14 21 40

But ones below do:

screen shot 2017-02-20 at 14 22 36

  1. When closing a node with the close parent of node command the icon doesn't respond:

screen shot 2017-02-20 at 14 23 19

But it does when you close the folder with open & close node command

@ryanoasis
Copy link
Owner

for 2 I was able to replicate and good catch thanks 😄


for 1 I was not able to replicate but don't doubt you saw that. can you provide more info or steps?
I tried to make a directory structure similar to yours (folder with only have a folder and then some files) but could not identify a pattern to reproduce

@ghost
Copy link
Author

ghost commented Feb 24, 2017

For 1 I did some more testing. It actually doesn't have anything to do with being the top node. Steps to recreate (for me):

  1. Create folder that contains only another folder (which contains a file): level-1/level-2/a-file.txt
  2. Open folder with open & close node command
  3. Icon does not respond

Now if you close and open again it will respond. It can be fixed by putting a file in folder level-1. So apparently it has to do with that folder only containing a folder. I could recreate this with the same folder structure at any place in the file tree (so not only at the root but also at lower levels).

@ghost
Copy link
Author

ghost commented Feb 24, 2017

screen shot 2017-02-24 at 10 14 45

See https://github.com/ismay/dotfiles for my setup

@ryanoasis ryanoasis added this to the v0.9.1 milestone May 2, 2017
@ryanoasis ryanoasis self-assigned this May 2, 2017
@ryanoasis
Copy link
Owner

It took longer than I thought but I have a working solution that is not too bad 😄

@ryanoasis
Copy link
Owner

I wasn't able to record but I have a screenshot that shows the results of O keypress (Recursively open the selected directory):

selection_001

@ghost
Copy link
Author

ghost commented May 7, 2017

Ah nice! One thing still remains for me: when closing a folder with close parent of node the icon still doesn't seem to respond.

@ryanoasis
Copy link
Owner

ryanoasis commented May 7, 2017

Yep correct. I was able to just finish fixing those as well:

  • x (Closes the parent of the selected node.)
  • X (Recursively closes all children of the selected directory.)

@ghost
Copy link
Author

ghost commented May 7, 2017

Nice!

@ryanoasis
Copy link
Owner

I am going to release this in a few hours 📦 , if you would like to help test the 0.9.1 branch is up. Thanks

@ghost
Copy link
Author

ghost commented May 8, 2017

Did some testing (the changes should be in master now right?), this is what I found:

  1. The top folder icon doesn't open/close: folder icon doesn't open on first open, but after that it opens/closes correctly (when opening/closing with NERDTreeMapActivateNode). So no change here.

screen shot 2017-05-08 at 12 52 39

screen shot 2017-05-08 at 12 52 47

  1. Has been fixed.

Hope this helps. Thanks for the updates!

@ryanoasis
Copy link
Owner

Ah okay I must have missed that in my haste. Yes master has the latest.

Thanks for testing! 😄

@ghost
Copy link
Author

ghost commented May 8, 2017

No problem, happy to help 👍 Let me know when more testing needs to be done!

@ryanoasis
Copy link
Owner

@ismay Hmm I still didn't quite get the issue, how do you replicate it? I am not seeing it 😊 Thanks

@ghost
Copy link
Author

ghost commented May 10, 2017

My dotfiles are here: https://github.com/ismay/dotfiles I don't know if that's too much, but with those (and in that repo), you can trigger the bug by opening vim and then nerdtree, and opening the first node by pressing l. Note that it only happens for folders contained in a folder with files.

Hope that helps!

@ryanoasis
Copy link
Owner

@ismay Thanks for the details. Looks like you remapped o to be l. Ah okay now I see the pattern that you mentioned:

selection_002

@ryanoasis ryanoasis modified the milestones: v0.10.0, v0.9.1, v0.9.2 May 10, 2017
@ryanoasis ryanoasis modified the milestones: v0.9.3, v0.9.2 May 29, 2017
@ryanoasis ryanoasis modified the milestones: v0.9.3, v0.10.0 Oct 12, 2017
@ryanoasis
Copy link
Owner

Not ideal but a workaround for this would be to set:

let NERDTreeCascadeSingleChildDir=0

At least until we have a fix (working on it!)

@ryanoasis
Copy link
Owner

This has been fixed! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant