Skip to content

Commit 0f43706

Browse files
committed
Reshuffle the escape key processing again
1 parent e492643 commit 0f43706

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

novelwriter/gui/doceditor.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -581,10 +581,6 @@ def updateDocMargins(self) -> None:
581581
lM = max(self._vpMargin, fH)
582582
self.setViewportMargins(tM, uM, tM, lM)
583583

584-
def isVimEscapable(self) -> bool:
585-
"""Check if Escape keypress should be processed for Vim mode."""
586-
return CONFIG.vimMode and self._vim.mode != nwVimMode.NORMAL
587-
588584
##
589585
# Getters
590586
##

novelwriter/guimain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,7 @@ def _keyPressEscape(self) -> None:
12761276
"""Process an escape keypress in the main window."""
12771277
if self.docEditor.searchVisible():
12781278
self.docEditor.closeSearch()
1279-
elif self.docEditor.isVimEscapable():
1279+
elif CONFIG.vimMode:
12801280
self.docEditor.setVimMode(nwVimMode.NORMAL)
12811281
elif SHARED.focusMode:
12821282
SHARED.setFocusMode(False)

0 commit comments

Comments
 (0)