monaco-editor icon indicating copy to clipboard operation
monaco-editor copied to clipboard

Completion selects based on insertion string

Open svenefftinge opened this issue 10 years ago • 5 comments

version: 0.7.3

How to reproduce: Go to playground completion example and use the completions below. In the example editor type in 'a' and see how 'abd' proposal gets auto-selected. It should select 'abc' instead.

function createDependencyProposals() {
    // returning a static list of proposals, not even looking at the prefix (filtering is done by the Monaco editor),
    // here you could do a server side lookup
    return [
        {
            label: 'abc',
            kind: monaco.languages.CompletionItemKind.Function,
            insertText: '"abc": "*"'
        },
        {
            label: 'abd',
            kind: monaco.languages.CompletionItemKind.Function,
            insertText: 'abd',
        }
    ];
}

svenefftinge avatar Oct 11 '16 06:10 svenefftinge

Seems to be this issue https://github.com/Microsoft/vscode/issues/11423

svenefftinge avatar Oct 11 '16 06:10 svenefftinge

Do you have an estimate when the fix will be in a monaco release?

svenefftinge avatar Oct 11 '16 06:10 svenefftinge

@svenefftinge @joaomoreno mentioned in my issue here https://github.com/Microsoft/monaco-editor/issues/219 that this has been resolved and should be included in next release.

aarinsmith avatar Oct 14 '16 16:10 aarinsmith

It looks like the fix for #11423 landed in master 5 days ago, so it will be contained in the next monaco-editor release, due at the end of this month / early beginning of next month. We ship it every month and won't create a new build unless we find some critical regression.

alexdima avatar Oct 18 '16 12:10 alexdima

Closing as duplicate.

joaomoreno avatar Oct 20 '16 07:10 joaomoreno