mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
vim-mode: reset to Normal mode when edit begins
This commit is contained in:
parent
41fef0ed88
commit
b7f2690e96
@ -595,6 +595,7 @@ VimMode VVim::getMode() const
|
|||||||
void VVim::setMode(VimMode p_mode)
|
void VVim::setMode(VimMode p_mode)
|
||||||
{
|
{
|
||||||
if (m_mode != p_mode) {
|
if (m_mode != p_mode) {
|
||||||
|
clearSelection();
|
||||||
m_mode = p_mode;
|
m_mode = p_mode;
|
||||||
resetState();
|
resetState();
|
||||||
|
|
||||||
|
@ -65,6 +65,9 @@ void VEditOperations::updateCursorLineBg()
|
|||||||
|
|
||||||
void VEditOperations::handleEditConfigUpdated()
|
void VEditOperations::handleEditConfigUpdated()
|
||||||
{
|
{
|
||||||
|
// Reset to Normal mode.
|
||||||
|
m_vim->setMode(VimMode::Normal);
|
||||||
|
|
||||||
updateCursorLineBg();
|
updateCursorLineBg();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user