mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-06 14:29:54 +08:00
vim-mode: bug fix
This commit is contained in:
parent
5e323cd9ab
commit
19323496d1
@ -2247,7 +2247,8 @@ void VVim::setMode(VimMode p_mode, bool p_clearSelection, int p_position)
|
|||||||
&& cursor.position() > cursor.anchor()) {
|
&& cursor.position() > cursor.anchor()) {
|
||||||
position = cursor.position() - 1;
|
position = cursor.position() - 1;
|
||||||
} else if (m_mode == VimMode::Insert
|
} else if (m_mode == VimMode::Insert
|
||||||
&& p_mode == VimMode::Normal) {
|
&& p_mode == VimMode::Normal
|
||||||
|
&& !cursor.atBlockStart()) {
|
||||||
position = cursor.position() - 1;
|
position = cursor.position() - 1;
|
||||||
if (position < 0) {
|
if (position < 0) {
|
||||||
position = 0;
|
position = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user