Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: autocomplete suggestion includes redundant prefix #1133

Closed
olafurpg opened this issue Mar 19, 2024 · 2 comments · Fixed by #1271
Closed

bug: autocomplete suggestion includes redundant prefix #1133

olafurpg opened this issue Mar 19, 2024 · 2 comments · Fixed by #1271
Labels
bug Something isn't working

Comments

@olafurpg
Copy link
Member

Cody Version

5.4.358-nightly

IDE Information

IntelliJ IDEA 2023.2.4 (Ultimate Edition)
Build #IU-232.10203.10, built on October 24, 2023
Licensed to Sourcegraph / Olaf Geirsson
Subscription is active until May 12, 2024.
Runtime version: 17.0.8.1+7-b1000.32 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.6.4
GC: G1 Young Generation, G1 Old Generation
Memory: 16000M
Cores: 10
Metal Rendering is ON
Registry:
    ide.browser.jcef.debug.port=9222
    ide.experimental.ui=true
    eslint.additional.file.extensions=svelte
    scala.erase.compiler.process.jdk.once=false

Non-Bundled Plugins:
    MatlabSupport (0.8.5)
    org.rust.lang (0.4.201.5424-232)
    IdeaVIM (2.7.5)
    com.github.shiraji.ccch (1.0.1)
    com.facebook.ktfmt_idea_plugin (1.1.0.47)
    google-java-format (1.21.0.0)
    com.jetbrains.intellij.code.search.polaris (0.232.1.119)
    org.jetbrains.kotlin (232-1.9.23-release-779-IJ10072.27)
    com.intellij.ml.llm (232.9826)
    com.virtuslab.git-machete (4.2.0)
    com.intellij.lang.jsgraphql (4.0.2)
    dev.blachut.svelte.lang (232.9921.36)
    org.intellij.scala (2023.2.29)
    com.sourcegraph.jetbrains (5.4.358-nightly)

Kotlin: 232-1.9.23-release-779-IJ10072.27

Describe the bug

Given the following code, I get an autocomplete suggestion like this

  class Numbers {
      public AtomicInteger counter = new AtomicInteger(<CURSOR>;

  }
CleanShot 2024-03-19 at 19 11 21@2x

Expected behavior

I expected the suggestion only to display the missing characters 0)

Additional context

No response

@olafurpg olafurpg added the bug Something isn't working label Mar 19, 2024
@olafurpg
Copy link
Member Author

I can also reproduce with 5.4.6-nightly

@pkukielka
Copy link
Contributor

Hey Olaf, was that the whole content of the file?
I somehow cannot reproduce it:

image

pkukielka added a commit that referenced this issue Apr 2, 2024
## Changes

Fixed bug with incorrect formatting of strings with cursor in the middle
of the line.
Fixes #1133

## Test plan

Unit test added
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants