mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-04-07 11:15:47 +02:00
Use the proper context component when firing an action
This commit is contained in:
parent
3808bfea60
commit
84b485c6bc
@ -87,10 +87,9 @@ internal class IjActionExecutor : VimActionExecutor {
|
||||
} else {
|
||||
try {
|
||||
isRunningActionFromVim = true
|
||||
// DataContext is build on the context component.
|
||||
// However, it should be null as in this case the data context is taken from the context and the
|
||||
// PlatformDataKeys.EDITOR is properly set.
|
||||
val contextComponent: Component? = null
|
||||
// The context component should be editor. This is especially important when running the `:action` commands
|
||||
// because at the moment of execution, the focused component is Ex Field, not editor.
|
||||
val contextComponent = editor?.ij?.contentComponent
|
||||
val res = ActionManager.getInstance().tryToExecute(ijAction, null, contextComponent, "IdeaVim", true)
|
||||
res.waitFor(5_000)
|
||||
return res.isDone
|
||||
|
Loading…
Reference in New Issue
Block a user