Skip to content

Commit

Permalink
Safer getCurrentModalInput()
Browse files Browse the repository at this point in the history
  • Loading branch information
lippfi committed Jul 12, 2024
1 parent 38e71f1 commit 7028587
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class ExEntryPanelService : VimCommandLineServiceBase(), VimModalInputService {
}

override fun getCurrentModalInput(): VimModalInput? {
return ExEntryPanel.getInstanceWithoutShortcuts()?.takeIf { it.isActive }?.let { WrappedAsModalInputExEntryPanel(it) }
return ExEntryPanel.getInstanceWithoutShortcuts()?.takeIf { it.isActive && it.myInputInterceptor != null }?.let { WrappedAsModalInputExEntryPanel(it) }
}

override fun create(editor: VimEditor, context: ExecutionContext, label: String, inputInterceptor: VimInputInterceptor<*>): VimModalInput {
Expand Down

0 comments on commit 7028587

Please sign in to comment.