From: NeilBrown Date: Tue, 20 Aug 2013 01:10:54 +0000 (+1000) Subject: Browse: allow "--replace" to be requested while viewing. X-Git-Tag: v1.0~34 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=de690cfcea22dedf129828e12529d37538296355;p=wiggle.git Browse: allow "--replace" to be requested while viewing. If you type 'S' then on exit the file you are looking at will be saved. Signed-off-by: NeilBrown --- diff --git a/vpatch.c b/vpatch.c index b5166b2..7b5c16d 100644 --- a/vpatch.c +++ b/vpatch.c @@ -1227,6 +1227,7 @@ static char *merge_window_help[] = { " ESC-< 0-G Go to start of file", " ESC-> G Go to end of file", " q Return to list of files or exit", + " S Arrange for merge to be saved on exit", " control-C Disable auto-save-on-exit", " control-L recenter current line", " control-V SPACE page down", @@ -1744,6 +1745,10 @@ static int merge_window(struct plist *p, FILE *f, int reverse, int replace, mesg = "Use 'q' to quit"; replace = 0; break; + case 'S': + mesg = "Will auto-save on exit, using Ctrl-C to cancel"; + replace = 1; + break; case 'q': refresh = 2; answer = 0;