Skip to content

my fix for troubles with VCSVimDiff against HEAD with cp1252 files #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

haron13-2019
Copy link

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).

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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant