Closed yous closed 6 years ago
This can be resolved by refreshing view using R
but this is annoying.
This bug was introduced in latest commit 2c69d6c62c7212908f3f8db434b56b2992e27921, so pinning to 264ea014d302ea8b4c05c7bda072184a47395149 should temporarily solve the problem.
Thanks all.
I still have this issue even though I have the latest update using PlugUpdate
. Please let me know if you'd like more details.
It seemed to be fixed for a while, but is still happening.
Er... using the same steps as above? After restarting vim?
I've restarted vim, run PlugUpdate
, and tried manually git pull
ing in the plugin directory. I can replicate the behavior in multiple ways:
vi foo.txt
), back out of file with -
, enter file with <enter>
, back out again with -
.vi .
), back out of directory -
, re-enter directory <enter>
vi .
), enter any folder <enter>
, back out of directory -
.If you change s:buf_modified()
to return 0
(and restart vim...) is the problem fixed?
In one of the empty dirvish buffers, what does this show:
:echo b:dirvish
:echo b:changedtick
Making the change to buf_modified
fixes the issue.
Running those commands (before the change):
:echo b:dirvish
{'altbuf': -1, '_dir': 'DIR_NAME_WAS_HERE', '_c': 5, 'prevbuf': 1}
:echo b:changedtick
24
After the change, _c
and b:changedtick
are both 11
Here's mine:
:echo b:dirvish
{'altbuf': -1, '_dir': '/path/to/dir/', '_c': 3, 'lastpath': '/path/to/dir/file', 'prevbuf': 1}
:echo b:changedtick
4
Changing s:buf_modified()
makes _c
and b:changedtick
to be the same.
Oh, do you have 'hidden' option set ?
No. I like behaviour of nohidden
.
-- Łukasz Jan Niemier
Wiadomość napisana przez Justin M. Keyes notifications@github.com w dniu 12.12.2017, o godz. 12:31:
Oh, do you have 'hidden' option set ?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
I don't have hidden set either
If you have :autocmd FileType dirvish ...
handlers setup, can you show them here? Also are you using g:dirvish_relative_paths=1
?
I have:
autocmd FileType dirvish silent keeppatterns g@\v/.*\.o|.*\.pyc|.*\.so/?$@d
let g:dirvish_relative_paths = 0
I can replicate the behavior with both of these commented out, or with g:dirvish_relative_paths
set to 1.
Does 17ee209a12884dd6c4c89482b223962a32279389 help?
Doesn't seem to :(. Ran PlugUpdate
which pulled in new changes (also checked manually).
:echo b:dirvish
{'altbuf': -1, '_dir': '/Users/dwayneyuen/', '_c': 4, 'prevbuf': 1}
:echo b:changedtick
5
Could you put :echom b:changedtick
at the beginning of s:do_open()
, to see if it changes somewhere after that?
Sure. :)
1) vi .
-> 2
2) -
-> 4
3) <enter>
-> 3
Same values if I <enter>
then -
(2, 4, 3).
thanks, but we also need to know :echo b:dirvish b:changedtick
after the buffer is loaded (i.e., do it at the :
-prompt). Else there's nothing to compare it. Sorry that wasn't clear.
@justinmk I have no auto commands.
:echo b:dirvish b:changedtick
{'altbuf': -1, '_dir': '/Users/hauleth/Workspace/hauleth/dotfiles/nvim/', '_c': 20, 'lastpath': '/Users/hauleth/Workspace/hauleth/dotfiles/nvim/init.vim', 'prevbuf': 2} 20
EDIT: ok, for me I haven't encountered it for some time.
Ah, gotcha.
1) vi .
- before: 2, after:
{'altbuf': -1, '_dir': '/Users/dwayneyuen/', '_c': 4, 'prevbuf': -1} 4
2) -
- before: 4, after:
{'altbuf': -1, '_dir': '/Users/', '_c': 3, 'lastpath': '/Users/dwayneyuen/', 'prevbuf': 1} 3
3) <enter>
- before: 3, after:
{'altbuf': -1, '_dir': '/Users/dwayneyuen/', '_c': 4, 'prevbuf': 1} 5
I'm running on MacOS High Sierra.
I can repro it. Will take a look.
Even with hidden
, vim unloads a nobuflisted
(or maybe buftype=nofile
) buffer if it is not showing in a window.
https://github.com/justinmk/vim-dirvish/commit/e4b3c4b62d0ddb2d24aa8f9fcf3820f6d6de4ebf fixes the issue for me. Thanks for your help and the amazingly quick turnaround!
This is a minial vimrc to reproduce:
How to reproduce:
-
Enter
-
Directories are properly displayed when I execute
:Dirvish %
at step 4.Vim version: