parent
de72c7d5d3
commit
0b57103c72
|
@ -984,6 +984,7 @@ public:
|
|||
|
||||
last_insert().mode = mode;
|
||||
last_insert().keys.clear();
|
||||
last_insert().disable_hooks = m_disable_hooks;
|
||||
context().hooks().run_hook("InsertBegin", "", context());
|
||||
prepare(m_insert_mode);
|
||||
}
|
||||
|
@ -1330,6 +1331,8 @@ void InputHandler::repeat_last_insert()
|
|||
|
||||
Vector<Key> keys;
|
||||
swap(keys, m_last_insert.keys);
|
||||
ScopedSetBool disable_hooks(context().user_hooks_disabled(),
|
||||
m_last_insert.disable_hooks);
|
||||
// context.last_insert will be refilled by the new Insert
|
||||
// this is very inefficient.
|
||||
push_mode(new InputModes::Insert(*this, m_last_insert.mode));
|
||||
|
|
|
@ -94,8 +94,8 @@ private:
|
|||
void push_mode(InputMode* new_mode);
|
||||
std::unique_ptr<InputMode> pop_mode(InputMode* current_mode);
|
||||
|
||||
struct Insertion{ InsertMode mode; Vector<Key> keys; };
|
||||
Insertion m_last_insert = {InsertMode::Insert, {}};
|
||||
struct Insertion{ InsertMode mode; Vector<Key> keys; bool disable_hooks; };
|
||||
Insertion m_last_insert = { InsertMode::Insert, {}, false };
|
||||
|
||||
char m_recording_reg = 0;
|
||||
String m_recorded_keys;
|
||||
|
|
Loading…
Reference in New Issue
Block a user