From 7cc66ee64d7e7271560d925de67e33bd7caa600a Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 13 Dec 2012 13:24:38 +0100 Subject: [PATCH] push current selection on search --- src/main.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.cc b/src/main.cc index fa8065f1..0213aef5 100644 --- a/src/main.cc +++ b/src/main.cc @@ -149,6 +149,7 @@ void do_search(Context& context) ex = RegisterManager::instance()['/'].values(context)[0]; else RegisterManager::instance()['/'] = ex; + context.push_jump(); } context.editor().select(std::bind(select_next_match, _1, ex), mode); }, context); @@ -159,7 +160,10 @@ void do_search_next(Context& context) { const String& ex = RegisterManager::instance()['/'].values(context)[0]; if (not ex.empty()) + { + context.push_jump(); context.editor().select(std::bind(select_next_match, _1, ex), mode); + } else context.print_status("no search pattern"); }