summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorG.raud <graud@gmx.com>2018-02-02 18:38:52 +0100
committerG.raud <graud@gmx.com>2018-02-02 23:21:46 +0100
commitb5fa37fa34b0052e8d7e676f1ff8eccee19e1041 (patch)
tree048e83271e4f8573eeb30e6373690d038a4d574e
parent7ddf255d851619d88705624310162cd822158d00 (diff)
downloadunison-b5fa37fa34b0052e8d7e676f1ff8eccee19e1041.zip
unison-b5fa37fa34b0052e8d7e676f1ff8eccee19e1041.tar.gz
unison-b5fa37fa34b0052e8d7e676f1ff8eccee19e1041.tar.bz2
Uitext: let "skip" and "discard" operate on matching items
-rw-r--r--src/uitext.ml17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/uitext.ml b/src/uitext.ml
index 9558834..24a89a4 100644
--- a/src/uitext.ml
+++ b/src/uitext.ml
@@ -265,9 +265,10 @@ let interact prilist rilist =
Uutil.File.dummy;
true
and setskip = function
- {replicas = Different ({direction = Conflict _})} -> ()
- | {replicas = Different diff} -> diff.direction <- Conflict "skip requested"
- | _ -> ()
+ {replicas = Different ({direction = Conflict _})} -> true
+ | {replicas = Different diff} ->
+ begin diff.direction <- Conflict "skip requested"; true end
+ | _ -> true
and setdir dir = function
{replicas = Different diff} -> begin diff.direction <- dir; true end
| _ -> true
@@ -441,18 +442,16 @@ let interact prilist rilist =
(["/";":"],
("skip"),
(fun () ->
- setskip ri;
- redisplayri();
- next()));
+ actOnMatching setskip));
(["%"],
("skip all the following"),
(fun () -> newLine();
- Safelist.iter setskip rest;
+ Safelist.iter (fun ri -> setskip ri; ()) rest;
repeat()));
(["-"],
("skip and discard for this session"),
- (fun () -> newLine();
- loop prev rest));
+ (fun () ->
+ actOnMatching (fun _->false)));
(["+"],
("skip and discard all the following"),
(fun () -> newLine();