summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-12-13 13:24:38 +0100
committerMaxime Coste <frrrwww@gmail.com>2012-12-13 13:24:38 +0100
commit7cc66ee64d7e7271560d925de67e33bd7caa600a (patch)
treed9d493ef7ef8434cf24fb5d273456164309d436f /src
parentd0c800a7d7bff149aff23a7f195cc99880d90f0e (diff)
push current selection on search
Diffstat (limited to 'src')
-rw-r--r--src/main.cc4
1 files changed, 4 insertions, 0 deletions
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");
}