ligasgr / intellij-xquery

Plugin to support XQuery in Intellij Idea
Apache License 2.0
35 stars 23 forks source link

Incorrect completion result when opening a function #167

Open rhdunn opened 8 years ago

rhdunn commented 8 years ago

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 commented 8 years ago

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.

ligasgr commented 8 years ago

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