From e0630e715eec2f553888b6a7178206dcf6e14055 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 1 Apr 2021 00:55:24 -0400 Subject: [PATCH] Fix the ordering of windows in the diff. --- vimgolf/version.txt | 2 +- vimgolf/vimgolf.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vimgolf/version.txt b/vimgolf/version.txt index 9325c3c..a2268e2 100644 --- a/vimgolf/version.txt +++ b/vimgolf/version.txt @@ -1 +1 @@ -0.3.0 \ No newline at end of file +0.3.1 \ No newline at end of file diff --git a/vimgolf/vimgolf.py b/vimgolf/vimgolf.py index f51e96f..ac279be 100644 --- a/vimgolf/vimgolf.py +++ b/vimgolf/vimgolf.py @@ -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': @@ -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