mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-07-05 05:38:52 +02:00
Compare commits
2 Commits
e096b803c5
...
3cc9ce73b9
Author | SHA1 | Date | |
---|---|---|---|
3cc9ce73b9 | |||
9370fb7809 |
@ -20,7 +20,7 @@ ideaVersion=2025.1
|
||||
# Values for type: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#intellij-extension-type
|
||||
ideaType=IC
|
||||
instrumentPluginCode=true
|
||||
version=chylex-48
|
||||
version=chylex-47
|
||||
javaVersion=21
|
||||
remoteRobotVersion=0.11.23
|
||||
antlrVersion=4.10.1
|
||||
|
@ -8,6 +8,7 @@
|
||||
package com.maddyhome.idea.vim.action
|
||||
|
||||
import com.google.common.collect.ImmutableSet
|
||||
import com.intellij.codeInsight.completion.CompletionService
|
||||
import com.intellij.codeInsight.lookup.LookupManager
|
||||
import com.intellij.openapi.actionSystem.ActionManager
|
||||
import com.intellij.openapi.actionSystem.ActionUpdateThread
|
||||
@ -208,6 +209,10 @@ class VimShortcutKeyAction : AnAction(), DumbAware/*, LightEditCompatible*/ {
|
||||
return ActionEnableStatus.yes("Vim only editor keys", LogLevel.INFO)
|
||||
}
|
||||
|
||||
if (CompletionService.getCompletionService().currentCompletion != null) {
|
||||
return ActionEnableStatus.no("Code completion active", LogLevel.INFO)
|
||||
}
|
||||
|
||||
val savedShortcutConflicts = VimPlugin.getKey().savedShortcutConflicts
|
||||
val info = savedShortcutConflicts[keyStroke]
|
||||
return when (info?.forEditor(editor.vim)) {
|
||||
|
@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Copyright 2003-2023 The IdeaVim authors
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE.txt file or at
|
||||
* https://opensource.org/licenses/MIT.
|
||||
*/
|
||||
|
||||
package com.maddyhome.idea.vim.vimscript.model.functions.handlers
|
||||
|
||||
import com.intellij.codeInsight.completion.CompletionService
|
||||
import com.intellij.vim.annotations.VimscriptFunction
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.vimscript.model.VimLContext
|
||||
import com.maddyhome.idea.vim.vimscript.model.datatypes.VimDataType
|
||||
import com.maddyhome.idea.vim.vimscript.model.datatypes.VimInt
|
||||
import com.maddyhome.idea.vim.vimscript.model.expressions.Expression
|
||||
import com.maddyhome.idea.vim.vimscript.model.functions.FunctionHandler
|
||||
|
||||
@VimscriptFunction(name = "pumvisible")
|
||||
internal class PopupMenuVisibleFunctionHandler : FunctionHandler() {
|
||||
override val minimumNumberOfArguments = 0
|
||||
override val maximumNumberOfArguments = 0
|
||||
|
||||
override fun doFunction(
|
||||
argumentValues: List<Expression>,
|
||||
editor: VimEditor,
|
||||
context: ExecutionContext,
|
||||
vimContext: VimLContext,
|
||||
): VimDataType {
|
||||
return if (CompletionService.getCompletionService().currentCompletion == null)
|
||||
VimInt.ZERO
|
||||
else
|
||||
VimInt.ONE
|
||||
}
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
{
|
||||
"has": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.HasFunctionHandler",
|
||||
"pumvisible": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.PopupMenuVisibleFunctionHandler"
|
||||
"has": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.HasFunctionHandler"
|
||||
}
|
Loading…
Reference in New Issue
Block a user