Gary Johnson wrote: > 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.
I can't reproduce the problem, the scratch buffer also has 'fileencoding' set to "latin1". Can you explain the steps from the very start? -- hundred-and-one symptoms of being an internet addict: 2. You kiss your girlfriend's home page. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- 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
