my fix for troubles with VCSVimDiff against HEAD with cp1252 files#1
Open
haron13-2019 wants to merge 1 commit intovim-scripts:masterfrom
Open
my fix for troubles with VCSVimDiff against HEAD with cp1252 files#1haron13-2019 wants to merge 1 commit intovim-scripts:masterfrom
haron13-2019 wants to merge 1 commit intovim-scripts:masterfrom
Conversation
I assume that somewhere after vim 8.0 vim stopped to guess fileencoding of generated buffer with empty fileencoding option, or assumes that to be utf8 internally. Anyway setting fileencoding explicitely on the generated buffer fixes the diff. Steps to reproduce: 1) Environment: cygwin with vim8.1 with patches 1-1772 2) mkdir tstvcscmd; cd tstvcscmd; git init . # Create empty git repository 3) for ((i = 1; i <= 200; i++)) ; do echo $i >> ./f; done; # prepare some file 4) printf '\xfc' >> f # insert "u umlaut" 5) for ((i = 200; i > 0; i--)) ; do echo $i >> ./f; done; 6) git add f 7) git ci -m 'f added' 8) cat f | sed -e '5,10d' > f.new ; mv f.new f # some modification 9) vim f -c 'VCSVimDiff' Without patch in my environment "u umlaut" is recognized as change in my working copy. With patch it is ignored (correctly).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I assume that somewhere after vim 8.0 vim stopped to guess fileencoding
of generated buffer with empty fileencoding option, or assumes that to
be utf8 internally. Anyway setting fileencoding explicitely on the
generated buffer fixes the diff.
Steps to reproduce:
Without patch in my environment "u umlaut" is recognized as change in my
working copy. With patch it is ignored (correctly).