autoenable word completion while inserting

This commit is contained in:
Maxime Coste 2012-10-01 14:23:04 +02:00
parent 29b72b3e24
commit bd0805cf3e
2 changed files with 8 additions and 0 deletions

View File

@ -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:

View File

@ -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;