huoguangjin / MultiHighlight

Jetbrains IDE plugin: highlight identifiers with custom colors 🎨💡
https://plugins.jetbrains.com/plugin/9511-multihighlight
GNU General Public License v3.0
104 stars 22 forks source link

与IdeaVim的EasyMotion一块使用会报错 #28

Closed JohnWickzzz closed 2 years ago

JohnWickzzz commented 2 years ago

在用这个插件选中单词之后,再接着使用EasyMotion的查找单词功能,之后MultiHighlight插件就没法正常使用了,偶尔会报错。 异常如下: java.lang.IllegalArgumentException: Invalid range specified: (-1, -1); at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:231) at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:226) at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:222) at com.intellij.openapi.util.TextRange.<init>(TextRange.java:41) at com.intellij.openapi.util.TextRange.<init>(TextRange.java:30) at com.intellij.openapi.util.TextRange.create(TextRange.java:151) at com.intellij.openapi.util.TextRange.create(TextRange.java:156) at top.rammer.multihighlight.highlight.MultiHighlightHandler.isClearHighlights(MultiHighlightHandler.java:216) at top.rammer.multihighlight.highlight.MultiHighlightHandler.findSymbols(MultiHighlightHandler.java:107) at top.rammer.multihighlight.highlight.MultiHighlightHandler.lambda$invoke$0(MultiHighlightHandler.java:83) at com.intellij.openapi.project.DumbService.withAlternativeResolveEnabled(DumbService.java:353) at top.rammer.multihighlight.highlight.MultiHighlightHandler.invoke(MultiHighlightHandler.java:82) at top.rammer.multihighlight.action.MultiHighlightAction.lambda$actionPerformed$0(MultiHighlightAction.java:40) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:174) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:164) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:150) at top.rammer.multihighlight.action.MultiHighlightAction.actionPerformed(MultiHighlightAction.java:38) at com.intellij.openapi.keymap.impl.ActionProcessor.performAction(ActionProcessor.java:65) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:573) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$doPerformActionInner$10(IdeKeyEventDispatcher.java:706) at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:260) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.doPerformActionInner(IdeKeyEventDispatcher.java:702) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:645) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:584) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:467) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:456) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:224) at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:804) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:754) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:498) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

JohnWickzzz commented 2 years ago

抱歉,刚才翻了一下issues,发现 #4 已经提到这个问题了

huoguangjin commented 2 years ago

下个版本应该可以一起解决掉 will fix in the next version

huoguangjin commented 2 years ago

The easymotion is a IdeaVim extension ant it is supported by IdeaVim-EasyMotion and AceJump.

AceJump removes all highlights when jump action ends. See #4.

References: https://github.com/JetBrains/ideavim/wiki/Emulated-plugins#easymotion

huoguangjin commented 2 years ago

下个版本应该可以一起解决掉 will fix in the next version

AceJump清掉了MultiHighlight的高亮,要作者等来修了 Wait for AceJump to fix..

huoguangjin commented 2 years ago

Please update AceJump 3.8.8.