Ingo Karkat wrote:
> Today I used the :diffpatch command for the first time (after more
> than 7 happy years with VIM :-), and I noticed that although the patch
> result window was in 'diff' mode, the folding was still done with
> markers, as specified by a modeline in my particular file. This is
> unexpected and inconsistent with the :diffsplit command, which always
> sets 'diff' and 'foldmethod=diff', even when the file's modeline (or a
> ftplugin) chooses another foldmethod.
>
> Attached patch moves the setting of 'diff', 'scrollbind' and 'wrap' to
> the end of the function, after the result buffer is named and
> autocommands have executed. I think this is how it was intended.
>
> Steps to reproduce:
>
> cat > test.txt <<EOF
> vim:fdm=marker
> a test {{{1
> }}}1
> EOF
> cp test.txt test.new
> echo "a change" >> test.new
> diff -c test.{txt,new} > test.txt.diff
> vim -N -u NONE test.txt
> :filetype on
> :diffpatch test.txt.diff
> :setlocal foldmethod?
> " Prints 'marker', should be 'diff'.
Thanks, I'll add it to the todo list.
--
hundred-and-one symptoms of being an internet addict:
39. You move into a new house and decide to Netscape before you landscape.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---