Skip to content

LSP completions only affect first selection in multiple selection #2016

Closed
@aral

Description

@aral

Summary

If you have multiple selections, language completion only affects the first one.

Reproduction Steps

Create a simple JS file and ensure JS LSP is installed.

const be

console.log('to', foo, 'or not to', foo)
  1. g3g (goto line 3)
  2. x (select line)
  3. s + foo return (select both foo instances)
  4. c (change)
  5. b ctrl x (autocomplete: select “be” constant – note: tab doesn’t seem to work with a two-letter autocompletion. Note: behaviour is the same if you use tab with a longer completion.)

What should happen

Both foo instances should autocomplete to be:

const be

console.log('to', be, 'or not to', be)

What actually happens

Only the first foo autocompletes to be:

const be

console.log('to', be, 'or not to', b)

Helix log

n/a

Platform

Linux (elementary OS 6; based on Ubuntu)

Terminal Emulator

io.elementary.t

Helix Version

helix 22.05-dev (2d4f94e)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-language-serverArea: Language server clientC-bugCategory: This is a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions