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

inlay-hints possible race-condition: inconsistent insertion order #12666

Open
Rudxain opened this issue Jan 24, 2025 · 0 comments
Open

inlay-hints possible race-condition: inconsistent insertion order #12666

Rudxain opened this issue Jan 24, 2025 · 0 comments
Labels
C-bug Category: This is a bug

Comments

@Rudxain
Copy link
Contributor

Rudxain commented Jan 24, 2025

Summary

This only happens in Insert-Mode

Reproduction Steps

So I was typing this:

export const trim_low = (s: string) => s.trim().toLowerCase();

Which renders as:

export const trim_low : (s: string) => string = (s: string) : string  => s.trim().toLowerCase();

Note

Relevant deps:

  • typescript-language-server@4.3.3 (global)
  • typescript@5.6.3 (local)

I try to place the cursor just after trim_low to append "0" to its name, the cursor shows up after the hint rather than before. This seems to be intentional (see #5934), but the insertion order is inconsistent.

I don't know exactly how it happened (I typed fast), but I managed to append the "0" to the name, while forcing it to render after (right-side) the hint, rather than the expected "before" (left-side):

// the spacing shown here may not be accurate,
// as this is from my brain memory
export const trim_low : (s: string) => string 0 = (s: string) : string  => s.trim().toLowerCase();

I want to emphasize that despite the broken rendering, the LSP properly sees trim_low0

Helix log

~/.cache/helix/helix.log
please provide a copy of `~/.cache/helix/helix.log` here if possible, you may need to redact some of the lines

Platform

Linux

Terminal Emulator

GNOME Terminal 3.54.2 using VTE 0.78.2 +BIDI +GNUTLS +ICU +SYSTEMD

Installation Method

.deb from "Releases" page

Helix Version

helix 25.01.1 (e7ac2fc)

@Rudxain Rudxain added the C-bug Category: This is a bug label Jan 24, 2025
@Rudxain Rudxain changed the title inlay-hints possible race-condition in INS mode (inconsistent cursor order) inlay-hints possible race-condition: inconsistent insertion order Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

1 participant