mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java-completion] IDEA-359174 first draft of command completion
- fix out of bounds exception GitOrigin-RevId: 352000f5b9f31c7a04b82e0ff3d88f78305c3179
This commit is contained in:
committed by
intellij-monorepo-bot
parent
fc963eee94
commit
eb55841447
+1
-1
@@ -150,7 +150,7 @@ class CommandCompletionService(
|
||||
val newList: MutableList<PreviousActionInfoContainer> = if (index != 0) {
|
||||
val previousBeforeDot = data?.firstOrNull()
|
||||
val last = data?.firstOrNull()
|
||||
if (previousBeforeDot != null && last != null) {
|
||||
if (previousBeforeDot != null && last != null && offset - index > 0) {
|
||||
val newString = editor.document.immutableCharSequence.substring(0, offset - index) + editor.document.immutableCharSequence.substring(offset)
|
||||
if (newString.hashCode() == previousBeforeDot.hashcode) {
|
||||
mutableListOf(previousBeforeDot)
|
||||
|
||||
Reference in New Issue
Block a user