Skip to content

Applying autocomplete can lead to extra chars #67

@Guldoman

Description

@Guldoman

If config.plugins.autocomplete.min_len is greater than 1, when the autocomplete dialog is open, the completion isn't updated until min_len is reached. In servers that reply with a textEdit, this causes the following behavior:

2023-07-17.19-53-50.mp4

In this case config.plugins.autocomplete.min_len was 3.
In the first attempt I'm writing only 2 chars, and then confirming the autocomplete. This leads to those two chars to be kept.
In the second attempt I'm writing 3 chars, enough to trigger an update, so when I confirm the autocomplete, the result is correct.

Two solutions come to mind:

  1. Updating when the autocomplete menu is open.
  2. When applying the textEdit we should manually delete the partial.

Solution 1 could potentially lead to problems with slower servers.
Solution 2 needs a patch to the autocomplete plugin.

For now I'll implement solution 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions