From bde726d0342f32ff2e9cb464a351450a43ecea9f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 15 Jul 2018 09:45:17 +1000 Subject: Change autoshowcompl to auto_complete with insert|prompt possible values --- src/input_handler.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/input_handler.cc') diff --git a/src/input_handler.cc b/src/input_handler.cc index cf9773c9..0d0d2feb 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -709,10 +709,10 @@ public: : InputMode(input_handler), m_prompt(prompt.str()), m_prompt_face(face), m_empty_text{std::move(emptystr)}, m_flags(flags), m_completer(std::move(completer)), m_callback(std::move(callback)), - m_autoshowcompl{context().options()["autoshowcompl"].get()}, + m_auto_complete{context().options()["auto_complete"].get() & AutoComplete::Prompt}, m_idle_timer{TimePoint::max(), context().flags() & Context::Flags::Draft ? Timer::Callback{} : [this](Timer&) { - if (m_autoshowcompl and m_refresh_completion_pending) + if (m_auto_complete and m_refresh_completion_pending) refresh_completions(CompletionFlags::Fast); if (m_line_changed) { @@ -880,7 +880,7 @@ public: } else if (key == ctrl('o')) { - m_autoshowcompl = false; + m_auto_complete = false; clear_completions(); if (context().has_client()) context().client().menu_hide(); @@ -1019,7 +1019,7 @@ private: LineEditor m_line_editor; bool m_line_changed = false; PromptFlags m_flags; - bool m_autoshowcompl; + bool m_auto_complete; bool m_refresh_completion_pending = true; Timer m_idle_timer; @@ -1078,11 +1078,11 @@ public: m_restore_cursor(mode == InsertMode::Append), m_edition(context()), m_completer(context()), - m_autoshowcompl{context().options()["autoshowcompl"].get()}, + m_auto_complete{context().options()["auto_complete"].get() & AutoComplete::Insert}, m_disable_hooks{context().hooks_disabled(), context().hooks_disabled()}, m_idle_timer{TimePoint::max(), context().flags() & Context::Flags::Draft ? Timer::Callback{} : [this](Timer&) { - if (m_autoshowcompl) + if (m_auto_complete) m_completer.update(); context().hooks().run_hook("InsertIdle", "", context()); }} @@ -1267,7 +1267,7 @@ public: } else if (key == ctrl('o')) { - m_autoshowcompl = false; + m_auto_complete = false; m_completer.reset(); } else if (key == ctrl('u')) @@ -1433,7 +1433,7 @@ private: ScopedEdition m_edition; InsertCompleter m_completer; const bool m_restore_cursor; - bool m_autoshowcompl; + bool m_auto_complete; Timer m_idle_timer; bool m_in_end = false; MouseHandler m_mouse_handler; -- cgit v1.2.3