1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-08-11 00:40:37 +02:00

Fixed bug with multiple carets <A-n> action

This commit is contained in:
Vitalii Karavaev 2018-08-09 13:54:31 +03:00
parent 73987eaf23
commit aa3e55cacc

View File

@ -53,13 +53,16 @@ class VimMultipleCursorsExtension : VimNonDisposableExtension() {
}
inner class NextOccurrenceHandler(val whole: Boolean = true) : VimExtensionHandler {
override fun execute(editor: Editor, context: DataContext) =
override fun execute(editor: Editor, context: DataContext) {
if (editor.caretModel.caretCount == 1 && CommandState.getInstance(editor).mode != Mode.VISUAL) {
nextOffset = -1
firstRange = null
handleFirstSelection(editor, whole)
}
else {
else if (CommandState.getInstance(editor).mode == Mode.VISUAL) {
handleNextSelection(editor)
}
}
}
inner class AllOccurrencesHandler(val whole: Boolean = true) : VimExtensionHandler {