Skip to content

Commit

Permalink
Fix the ordering of windows in the diff.
Browse files Browse the repository at this point in the history
  • Loading branch information
dstein64 committed Apr 1, 2021
1 parent b69b09a commit e0630e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion vimgolf/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.0
0.3.1
4 changes: 2 additions & 2 deletions vimgolf/vimgolf.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def play(challenge, workspace):
write('Invalid selection: {}'.format(selection), stream=sys.stderr, color='red')
elif selection == 'd':
# diffsplit is used instead of 'vim -d' to avoid the "2 files to edit" message.
diff_args = ['-n', infile, '-c', 'vertical diffsplit {}'.format(outfile)]
diff_args = ['-n', outfile, '-c', 'vertical diffsplit {}'.format(infile)]
if VimRunner.run(diff_args) != Status.SUCCESS:
return Status.FAILURE
elif selection == 'w':
Expand Down Expand Up @@ -804,7 +804,7 @@ def diff(challenge_id):
with open(outfile, 'w') as f:
f.write(out_text)
# diffsplit is used instead of 'vim -d' to avoid the "2 files to edit" message.
diff_args = ['-n', infile, '-c', 'vertical diffsplit {}'.format(outfile)]
diff_args = ['-n', outfile, '-c', 'vertical diffsplit {}'.format(infile)]
if VimRunner.run(diff_args) != Status.SUCCESS:
return Status.FAILURE
return Status.SUCCESS
Expand Down

0 comments on commit e0630e7

Please sign in to comment.