mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-03 18:19:17 +03:00
Do not disable incsearch option in context wrap
It will only trigger on idle, which should not happen during non- interactive contexts.
This commit is contained in:
parent
03f8679e5c
commit
e947c20ce0
@ -1495,20 +1495,6 @@ const ParameterDesc context_wrap_params = {
|
||||
ParameterDesc::Flags::SwitchesOnlyAtStart, 1
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct DisableOption {
|
||||
DisableOption(Context& context, const char* name)
|
||||
: m_option(context.options()[name]),
|
||||
m_prev_value(m_option.get<T>())
|
||||
{ m_option.set(T{}, false); }
|
||||
|
||||
~DisableOption() { m_option.set(m_prev_value, false); }
|
||||
|
||||
private:
|
||||
Option& m_option;
|
||||
T m_prev_value;
|
||||
};
|
||||
|
||||
class RegisterRestorer
|
||||
{
|
||||
public:
|
||||
@ -1552,10 +1538,6 @@ void context_wrap(const ParametersParser& parser, Context& context, Func func)
|
||||
(int)(bool)parser.get_switch("try-client") > 1)
|
||||
throw runtime_error{"Only one of -buffer, -client or -try-client can be specified"};
|
||||
|
||||
// Disable these options to avoid costly code paths (and potential screen
|
||||
// redraws) That are useful only in interactive contexts.
|
||||
DisableOption<bool> disable_incsearch(context, "incsearch");
|
||||
|
||||
const bool no_hooks = parser.get_switch("no-hooks") or context.hooks_disabled();
|
||||
const bool no_keymaps = not parser.get_switch("with-maps");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user