1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-03-03 18:32:54 +01:00

Fixed beep

This commit is contained in:
lippfi 2021-08-16 21:02:45 +03:00
parent 8a2d3e1aed
commit dc8f5e9b25
2 changed files with 5 additions and 3 deletions
src/com/maddyhome/idea/vim

View File

@ -28,6 +28,7 @@ import com.intellij.openapi.diagnostic.debug
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.util.SystemInfo
import com.maddyhome.idea.vim.VimPlugin
import com.maddyhome.idea.vim.ex.ExException
import com.maddyhome.idea.vim.ex.ExOutputModel
import com.maddyhome.idea.vim.helper.EditorHelper
import com.maddyhome.idea.vim.helper.MessageHelper
@ -303,8 +304,7 @@ object OptionsManager {
}
if (editor != null && error != null) {
VimPlugin.showMessage(MessageHelper.message(error, token))
VimPlugin.indicateError()
throw ExException(MessageHelper.message(error, token))
}
return error == null

View File

@ -51,7 +51,9 @@ object Executor {
val result = unit.execute(editor, context, vimContext)
if (result is ExecutionResult.Error) {
finalResult = ExecutionResult.Error
VimPlugin.indicateError()
if (indicateErrors) {
VimPlugin.indicateError()
}
}
} catch (e: ExException) {
finalResult = ExecutionResult.Error