mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2026-03-30 12:52:35 +02:00
Compare commits
6 Commits
customized
...
customized
| Author | SHA1 | Date | |
|---|---|---|---|
|
7b813899f0
|
|||
|
727dee5b85
|
|||
|
3e7ea8668c
|
|||
|
89f7c76180
|
|||
|
a7d0297e2d
|
|||
|
45da61debe
|
@@ -20,7 +20,7 @@ ideaVersion=2026.1
|
||||
# Values for type: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#intellij-extension-type
|
||||
ideaType=IU
|
||||
instrumentPluginCode=true
|
||||
version=chylex-54
|
||||
version=chylex-53
|
||||
javaVersion=21
|
||||
remoteRobotVersion=0.11.23
|
||||
antlrVersion=4.10.1
|
||||
|
||||
@@ -49,6 +49,7 @@ import com.maddyhome.idea.vim.group.NotificationService
|
||||
import com.maddyhome.idea.vim.group.visual.IdeaSelectionControl
|
||||
import com.maddyhome.idea.vim.helper.exitSelectMode
|
||||
import com.maddyhome.idea.vim.helper.exitVisualMode
|
||||
import com.maddyhome.idea.vim.helper.hasVisualSelection
|
||||
import com.maddyhome.idea.vim.helper.isIdeaVimDisabledHere
|
||||
import com.maddyhome.idea.vim.newapi.globalIjOptions
|
||||
import com.maddyhome.idea.vim.newapi.initInjector
|
||||
@@ -332,6 +333,23 @@ internal object IdeaSpecifics {
|
||||
vimEditor.exitMode()
|
||||
vimEditor.mode = Mode.NORMAL()
|
||||
}
|
||||
} else {
|
||||
// IdeaSelectionControl will not be called if we're moving to a new variable with no change in selection.
|
||||
// And if we're moving to the end of the template, the change in selection will reset us to Normal because
|
||||
// IdeaSelectionControl will be called when the template is no longer active.
|
||||
if ((!editor.selectionModel.hasSelection() && !vimEditor.mode.hasVisualSelection) || newIndex == -1) {
|
||||
if (vimEditor.isIdeaRefactorModeSelect) {
|
||||
if (vimEditor.mode !is Mode.INSERT) {
|
||||
vimEditor.exitMode()
|
||||
injector.application.runReadAction {
|
||||
val context = injector.executionContextManager.getEditorExecutionContext(editor.vim)
|
||||
VimPlugin.getChange().insertBeforeCaret(editor.vim, context)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
vimEditor.mode = Mode.NORMAL()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,5 +20,5 @@ import com.maddyhome.idea.vim.vimscript.model.functions.BuiltinFunctionHandler
|
||||
@VimscriptFunction(name = "pumvisible")
|
||||
internal class PopupMenuVisibleFunctionHandler : BuiltinFunctionHandler<VimInt>() {
|
||||
override fun doFunction(arguments: Arguments, editor: VimEditor, context: ExecutionContext, vimContext: VimLContext) =
|
||||
(CompletionService.getCompletionService().currentCompletion != null).asVimInt()
|
||||
(CompletionService.getCompletionService().currentCompletion == null).asVimInt()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user