From 9a805697167a515ed1b7fe9995b32841bed55188 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Thu, 10 Dec 2015 13:55:17 +1100 Subject: [PATCH] search: used Move-File rather than mark_reset to go to start. this removes another doc_from_pane call. Signed-off-by: NeilBrown --- emacs-search.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/emacs-search.c b/emacs-search.c index 2c3e69a0..59fe0efe 100644 --- a/emacs-search.c +++ b/emacs-search.c @@ -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); -- 2.39.5