I recently noticed an odd behavior of the DiffOrig command. If
'encoding' is "utf-8", 'fileencoding' is "latin1", and the file I'm
editing contains characters whose encoding is different between
utf-8 and latin1, DiffOrig will display the lines containing those
characters in unfolded regions as though the lines are different,
but the lines are not highlighted as they would be if they contained
actual differences.
At that point, ":windo set enc? fenc?" shows the following:
encoding=utf-8
fileencoding=
encoding=utf-8
fileencoding=latin1
I think the solution to this is to change the DiffOrig command to
add the ++edit option to the :read command, as follows.
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
\ | wincmd p | diffthis
It seems to be working for me, but I wanted to check that I wasn't
missing something before making a patch for both affected files.
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