On 2020-05-05, xdegaye wrote:
> Describe the bug
>
> The DirDiffNext command of the DirDiff plugin creates buffers that do not
> exist
> on the file system. git bisect says that this happened after patch 8.1.2289:
> after :diffsplit closing the window does not disable diff.
>
> A mail refering to this issue is being sent to the DirDiff maintainer.
>
> To Reproduce
>
> Content of the /path_to_testdir directory:
>
> $ cd /path_to_testdir; ls -R
> .:
> one/ two/
>
> ./one:
> a b
>
> ./two:
> a b
>
> The content of file /path_to_testdir/two/a is AA. The content of the three
> other files is not relevant.
>
> Run the following commands in the test directory (note that the call to
> DirDiffNext may be replaced by hitting the keys j and <Enter>:
>
> :DirDiff one/ two/
> :ls
> 1 %a- "/tmp/vnc0HK7/1" line 7
> 2 a "/path_to_testdir/two/a" line 0
> 3 a "/path_to_testdir/one/a" line 0
> :DirDiffNext
> :ls
> 1 a- "/tmp/vnc0HK7/1" line 7
> 2 %a- "/path_to_testdir/two/a" line 1
> 4 a "/b" line 0
> 5 a "AA/b" line 0
>
> Problem: the new buffers 4 and 5 do not exist.
>
> Environment (please complete the following information):
>
> • All Vim versions after (and including) 8.1.228.
> • Archlinux
> • DirDiff version 1.1.4, i.e. the latest version.
>
> Investigation
>
> The problem does not occur when the call to set_diff_option() in ex_diffoff()
> at the HEAD of the vim master branch is commented out.
>
> DirDiffNext parses the buffer of the top right window instead of the one in
> the
> bottom window. So it seems that either patch 8.1.2289 does not restore some
> context after calling ex_diffoff() or that the plugin makes some assumption
> that is not anymore valid after the patch.
>
> Workaround
>
> The following patch to dirdiff.vim prevents the call to ex_diffoff() and is a
> workaround (the plugin does not need the new closeoff option although it
> should
> be able to run with it).
>
> diff --git a/dirdiff.vim b/dirdiff.vim
> index b4a602e..03769e9 100644
> --- a/dirdiff.vim
> +++ b/dirdiff.vim
> @@ -411,6 +411,7 @@ function! <SID>DirDiffOpen()
>
> " Go back to the diff window
> wincmd j
> + set diffopt=internal,filler
> " Resize the window
> exe("resize " . g:DirDiffWindowSize)
> exe (b:currentDiff)
On 2020-05-05, xdegaye wrote:
> Oups, s/DirDiff version 1.1.4/DirDiff version 1.1.5/ which is
> indeed the latest version.
I was able to reproduce the problem starting Vim as "vim --clean",
using Vim 8.2.587, and sourcing the plugin, version 1.1.5.
Interestingly, if I started Vim as just "vim", with all my
configuration, DirDiff behaved fine.
While the latest version on the Vim scripts page,
https://www.vim.org/scripts/script.php?script_id=102, is 1.1.5, that
page is no longer maintained. The plugin is now available only from
the GitHub repo at https://github.com/will133/vim-dirdiff. The
latest version is 1.1.6.
I didn't know all that until I started looking into this problem.
I discovered that my dirdiff plugin was out of date, so I updated to
the latest from the repo. I no longer see the problem.
Regards,
Gary
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20200505185831.GE390%40phoenix.