intellij-xquery icon indicating copy to clipboard operation
intellij-xquery copied to clipboard

Incorrect completion result when opening a function

Open rhdunn opened this issue 10 years ago • 2 comments

With the fix for #161, go to the Editor > General > Smart Keys settings, and disable the Insert pair bracket option.

Given:

declare function foo() <caret>

typing { gives:

declare function foo() {<caret>
;

With the Insert pair bracket option enabled, I am seeing the correct behaviour as per the test case for this.

Additionally, given:

declare function foo() <caret>
};

typing { gives:

declare function foo() {<caret>
;};

With the Insert pair bracket option enabled, I get:

declare function foo() {<caret>
};;

rhdunn avatar Dec 04 '15 11:12 rhdunn

An additional case -- this does not autocomplete when typing on the last line of a file with Insert pair bracket. In that case, typing { does not add the semi-colon.

I would only expect this autocomplete action to be triggered when Insert pair bracket is true.

rhdunn avatar Dec 04 '15 17:12 rhdunn

Thanks for raising that. I'll try to improve handling of all of those edge cases.

ligasgr avatar Dec 07 '15 21:12 ligasgr