" x toggle ignoring of current Changed,",
" Conflict, or Unmatched item",
" c toggle accepting of result of conflict",
- " X toggle ignored of all Change, Conflict",
- " and Unmatched items in current line",
+ " X Revert 'c' and 'x' changes on this line",
" v Save the current merge and run the",
" default editor on the file.",
NULL
int lineno;
int changes = 0; /* If any edits have been made to the merge */
int answer; /* answer to 'save changes?' question */
- int do_mark;
char *tempname;
struct elmnt e;
char search[80]; /* string we are searching for */
break;
case 'c': /* Toggle accepting of conflict.
- * A 'Conflict' becomes 'Changed'
+ * A 'Conflict' or 'Extraneous' becomes 'Changed'
*/
- if (ci.merger[curs.pos.m].oldtype != Conflict)
+ if (ci.merger[curs.pos.m].oldtype != Conflict &&
+ ci.merger[curs.pos.m].oldtype != Extraneous)
break;
if (ci.merger[curs.pos.m].type == Changed)
changes = 1;
break;
- case 'X': /* toggle where all Conflicts and Changeds
- * in the current line are marked Unchanged.
- * If any are not mark, mark them all, else
- * un-mark them all.
- */
- tpos = pos;
- do_mark = 0;
- do {
- if ((ci.merger[tpos.p.m].oldtype == Conflict ||
- ci.merger[tpos.p.m].oldtype == Changed ||
- ci.merger[tpos.p.m].oldtype == Unmatched)
- && (ci.merger[tpos.p.m].type ==
- ci.merger[tpos.p.m].oldtype))
- do_mark = 1;
- e = prev_melmnt(&tpos.p, fm, fb, fa, ci.merger);
- if (tpos.p.m < 0)
- break;
- } while (!ends_line(e) ||
- visible(mode & (RESULT|AFTER), ci.merger, &tpos) < 0);
+ case 'X': /* Reset all changes on the current line */
tpos = pos;
do {
- if (ci.merger[tpos.p.m].oldtype == Conflict ||
- ci.merger[tpos.p.m].oldtype == Changed ||
- ci.merger[tpos.p.m].oldtype == Unmatched) {
- next = Unchanged;
- if (ci.merger[tpos.p.m].oldtype == Unmatched)
- next = Changed;
- if (do_mark)
- ci.merger[tpos.p.m].type = next;
- else
- ci.merger[tpos.p.m].type =
- ci.merger[tpos.p.m].oldtype;
- }
+ ci.merger[tpos.p.m].type =
+ ci.merger[tpos.p.m].oldtype;
e = prev_melmnt(&tpos.p, fm, fb, fa, ci.merger);
if (tpos.p.m < 0)
break;
.P
A limited amount of editing is permitted while in
.B browse
-mode. Currently any Conflict or Changed section can be converted to
-Unchanged by using the
-.B x
-key (lower case), or all the Conflict and Changes sections in a line
-can be converted to Unchanged.
+mode. Currently text that is unwanted can be discarded with
+.BR x .
+This will convert a Conflict or Change to Unchanged, and an Unmatched
+to Changed (which effectively changes it to the empty string).
+Similarly a text can be marked as wanted with
+.BR c .
+This will convert a Conflict or Extraneous to Changed. Using the same
+key again will revert the change.
+.P
+Finally, the uppercase
.B X
-(upper case). The effect can be toggled by pressing
-.B x
-or
-.B X
-again.
-.P
-A Conflict section can also be converted to Change (so the result is
-accepted even though there wasn't a proper match) with the (lower
-case)
-.B c
-key. Pressing
-.B c
-effects a toggle.
-.P
-If you make any changes, then wiggle will ask you if you want
-to save the changes, even if
-.B \-\-replace
-was not given.
+will revert all changes on the current line.
.P
To make more sweeping changes you can use
.B v
or
.B $EDITOR
if they are set in the environment.
+.P
+If you make any changes, then wiggle will ask you if you want
+to save the changes, even if
+.B \-\-replace
+was not given.
.SH WARNING
Caution should always be exercised when applying a rejected patch with
.IR wiggle .