diff --git a/src/client.cc b/src/client.cc index dc6f7310..62c52764 100644 --- a/src/client.cc +++ b/src/client.cc @@ -438,6 +438,13 @@ public: break; default: m_inserter.insert(String() + key.key); + if (m_inserter.editor().selections().size() == 1 and + is_word(key.key)) + { + m_completer.reset(context); + reset_completer = false; + m_completer.select(context, 0); + } } break; case Key::Modifiers::Control: diff --git a/src/editor.hh b/src/editor.hh index c16a60fc..9d3732da 100644 --- a/src/editor.hh +++ b/src/editor.hh @@ -125,6 +125,7 @@ public: void move_cursors(const BufferCoord& offset); Buffer& buffer() const { return m_editor.buffer(); } + Editor& editor() const { return m_editor; } private: InsertMode m_mode;