]> git.neil.brown.name Git - edlib.git/commitdiff
search: used Move-File rather than mark_reset to go to start.
authorNeilBrown <neil@brown.name>
Thu, 10 Dec 2015 02:55:17 +0000 (13:55 +1100)
committerNeilBrown <neil@brown.name>
Thu, 10 Dec 2015 04:10:10 +0000 (15:10 +1100)
this removes another doc_from_pane call.

Signed-off-by: NeilBrown <neil@brown.name>
emacs-search.c

index 2c3e69a082760a3ebb3034fa50460a43d93c7dca..59fe0efef953cf30fdb6d8ad6a5dc3d2d9029813 100644 (file)
@@ -44,14 +44,10 @@ DEF_CMD(search_again);
 DEF_CMD(search_forward)
 {
        struct es_info *esi = ci->home->data;
-       struct doc *d = doc_from_pane(esi->target);
        struct stk *s;
        char *str;
        bool first = 1;
 
-       if (!d)
-               return -1;
-
        if (esi->s && mark_same_pane(esi->target, esi->s->m, esi->end, NULL)) {
                /* already pushed and didn't find anything new */
                return 1;
@@ -80,7 +76,7 @@ DEF_CMD(search_forward)
        else {
                esi->start = mark_dup(s->m, 1);
                esi->wrapped = 1;
-               mark_reset(d, esi->start);
+               call3("Move-File", esi->target, -1, esi->start);
        }
        /* Trigger notification so isearch watcher searches again */
        doc_replace(esi->search, NULL, "", &first);