Menu

#445 Code Completion - Autoselect single match

Undefined
fixed
Alpha
Bug_Report
2017-01-06
2016-12-02
No

Editor Settings > General Settings > [Editor settings]

With:

[x] Code completion
[x] Case sensitive
[X] Autoselect single match
Autolaunch after typing # letters [3]

In C attempting to type 'fprintf' when 'fpr' is reach the following incorrect completion is inserted:

fprintf(): int

It includes the ':' and 'int' (the type 'int' should not be inserted, and certainly not after the closing paren. Further, related to Bug #444, with Padding outside parenthesis selected a space should be inserted between fprintf and '()'.

Removing '[ ] Autoselect single match' and disabling Editor Settings > Code completion > [Code completion] [ ] Add parentheses after function name auto completion, then a 'fprintf' without any paren is properly inserted on manual completion.

I don't know why it would try and insert 'fprintf(): int' in the code with only single choice enabled, but that is certainly not expected.

Discussion

  • Alpha

    Alpha - 2016-12-31
    • labels: --> CodeCompletion
    • status: open --> fixed
    • assigned_to: Alpha
     
  • Alpha

    Alpha - 2016-12-31

    Fixed in [r10957].

     

    Related

    Commit: [r10957]

  • Teodor Petrov

    Teodor Petrov - 2017-01-02

    @Alpha: Have you talked with scintilla devs about this "Using stc->AutoCompSetChooseSingle() does not send wxEVT_SCI_AUTOCOMP_SELECTION"?

     
    • Alpha

      Alpha - 2017-01-03
       
  • david rankin

    david rankin - 2017-01-06

    You guys rock! Rarely, is there such timely correction of bugs in any open-source project (I've been involved in many since 2001). That says a lot for CodeBlocks, and you all in particular. Good job (sorry for the noise, but it was warranted)

     

Log in to post a comment.

Auth0 Logo