### Medium
-- [ ] lib-mergeview improvements
+- [X] lib-mergeview improvements
- [ ] lib-diff slowness with large diff
- [ ] linecount :when used in 'view' mode, stack the counting pane with all the
others so it can easily catch view-changed.
- [ ] Consider what else can be done with < and > on other markers.
- [X] Capture :CX:C-x command to cycle through matching places in the
three branches.
-- [ ] merge-mode automatic detect, enable, goto-first
+- [X] merge-mode automatic detect, enable, goto-first
I'm not sure I want this, but probably try it and see
Maybe time-limit on search
self.merge_char = None
self.call("doc:request:doc:replaced")
self.call("doc:request:mark:moving")
+ if focus["mergeview-autofind"] == "true":
+ focus.call("doc:set:mergeview-autofind")
+ m = self.call("doc:point", ret='mark')
+ self.call("K:A-m", self, m)
def fore(self, m, end, ptn):
if not m:
return edlib.Efallthrough
+def merge_appeared(key, focus, **a):
+ t = focus["doc-type"]
+ if t != "text":
+ return 1
+ m = edlib.Mark(focus)
+ try:
+ focus.call("text-search", m, "^<<<<<<<")
+ focus.call("doc:append:view-default", ",merge")
+ focus.call("doc:set:mergeview-autofind", "true")
+ except:
+ pass
+
def merge_view_attach(key, focus, comm2, **a):
p = MergePane(focus)
if not p:
edlib.editor.call("global-set-command", "attach-merge", merge_view_attach)
edlib.editor.call("global-set-command", "interactive-cmd-merge-mode", add_merge)
edlib.editor.call("global-load-module", "lib-wiggle")
+edlib.editor.call("global-set-command", "doc:appeared-mergeview", merge_appeared)