Changeset View
Changeset View
Standalone View
Standalone View
src/vimode/inputmodemanager.cpp
Show First 20 Lines • Show All 323 Lines • ▼ Show 20 Line(s) | 323 | case ViMode::ReplaceMode: | |||
---|---|---|---|---|---|
324 | return m_viReplaceMode; | 324 | return m_viReplaceMode; | ||
325 | } | 325 | } | ||
326 | return nullptr; | 326 | return nullptr; | ||
327 | } | 327 | } | ||
328 | 328 | | |||
329 | void InputModeManager::viEnterNormalMode() | 329 | void InputModeManager::viEnterNormalMode() | ||
330 | { | 330 | { | ||
331 | bool moveCursorLeft = (m_currentViMode == ViMode::InsertMode || m_currentViMode == ViMode::ReplaceMode) | 331 | bool moveCursorLeft = (m_currentViMode == ViMode::InsertMode || m_currentViMode == ViMode::ReplaceMode) | ||
332 | && m_viewInternal->getCursor().column() > 0; | 332 | && m_viewInternal->cursorPosition().column() > 0; | ||
333 | 333 | | |||
334 | if (!m_lastChangeRecorder->isReplaying() && | 334 | if (!m_lastChangeRecorder->isReplaying() && | ||
335 | (m_currentViMode == ViMode::InsertMode || | 335 | (m_currentViMode == ViMode::InsertMode || | ||
336 | m_currentViMode == ViMode::ReplaceMode)) { | 336 | m_currentViMode == ViMode::ReplaceMode)) { | ||
337 | // '^ is the insert mark and "^ is the insert register, | 337 | // '^ is the insert mark and "^ is the insert register, | ||
338 | // which holds the last inserted text | 338 | // which holds the last inserted text | ||
339 | KTextEditor::Range r(m_view->cursorPosition(), m_marks->getInsertStopped()); | 339 | KTextEditor::Range r(m_view->cursorPosition(), m_marks->getInsertStopped()); | ||
340 | 340 | | |||
▲ Show 20 Lines • Show All 142 Lines • Show Last 20 Lines |