Skip to content

Auto-completion in list literals strips delimiters away. #161

@j-em

Description

@j-em

Description

Triggering auto-completion on an identifier that is preceded by [ removes the [ itself on candidate insertion.

Repro steps

  1. Type in the following code.
type Animal = Dog | Cat

let animals = [Do//<- cursor is here
  1. Trigger company-complete while cursor is right after [Do

  2. Select the Dog candidate in company UI.

Expected behavior

Do gets auto-completed to Dog while the leading [ stays intact.

Code before auto-completion

type Animal = Dog | Cat
let animals = [Do

Code after auto-completion

type Animal = Dog | Cat 
let animals = [Dog

Actual behavior

Do gets auto-completed to Dog while the leading [ is stripped away.

Code before auto-completion

type Animal = Dog | Cat
let animals = [Do

Code after auto-completion

type Animal = Dog | Cat
let animals = Dog

Known workarounds

Inserting a space between the opening bracket and the first element of the list makes the auto-completion work properly again.

Related information

  • Ubuntu 16.04 LTS
  • Emacs 24.5.1 & Emacs 27.0.50 (Tested on both)
  • Mono 5.10 & .NET Core 2.0.3

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