diff --git a/src/main.cc b/src/main.cc index 8cfa2c7b..506748f3 100644 --- a/src/main.cc +++ b/src/main.cc @@ -155,6 +155,8 @@ void do_search(Context& context) RegisterManager::instance()['/'] = ex; context.push_jump(); } + else if (not context.options()["incsearch"].as_int()) + return; context.editor().select(std::bind(select_next_match, _1, ex), mode); } diff --git a/src/option_manager.cc b/src/option_manager.cc index 3b8f23b9..3857c78e 100644 --- a/src/option_manager.cc +++ b/src/option_manager.cc @@ -99,6 +99,7 @@ GlobalOptions::GlobalOptions() set_option("BOM", Option("no")); set_option("shell", Option("sh")); set_option("complete_prefix", Option(1)); + set_option("incsearch", Option(1)); set_option("ignored_files", Option(R"(^(\..*|.*\.(o|so|a))$)")); }