On Friday, 11 May 2012 10:35:04 UTC+2, Christian Brabandt wrote: > On Fr, 11 Mai 2012, Christian Brabandt wrote: > > > On Do, 10 Mai 2012, GeertVc wrote: > > > > > When changing one or both files which are currently open/compared in > > > VimDiff, in an *external* editor (so, not in Vim or VimDiff itself), > > > VimDiff doesn't update the diffs when forcing an update using the > > > command ":diffupdate". In fact, nothing happens at all while > > > executing this ":diffupdate" command. > > > > > > Only when forcing VimDiff to lose focus and re-gain focus again, I see > > > the message that files have been changed. After (re)loading the > > > changed files, the diff is updated. > > > > > > I enforce losing focus by executing the command ":shell" from within > > > VimDiff and then exit-ing the shell mode again to come back to > > > VimDiff. > > > > > > Is ":diffupdate" not supposed to "forcefully" rescan both files and > > > update the view? > > > > > > I'm using VimDiff version 7.1.138 on Ubuntu 8.04, but the same > > > complaint is valid for VimDiff 7.3.449 on a very recent Ubuntu 12.04 > > > distro. > > > > Yeah, diffupdate only updates the diff for the buffer that is loaded. It > > doesn't check, whether the original file, has been changed. If you want > > this, I suggest you set the 'autoread' option together with an > > CursorHold autocommand, e.g. like this > > > > au CursorHold * checktime > > BTW: Here is a patch, that let's you use :diffupdate! to force reloading > the buffers before updating the diff. Be careful, as you will lose all > your changes that you have made to a buffer without saving. > > regards, > Christian
Hi Christian, Your patch works like a charm!!! That is, on a quite recent Vim version (see original post), I didn't test it on my "old" 7.1 version... Would it be possible for you to send this patch to Bram Moolenaar to have it in the upstream? Much appreciated! Best rgds, --Geert -- You received this message from the "vim_use" 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
