Page 1 of 1

patchoffer for 4433 and 4375: autoinsert useroption

Posted: Tue Oct 05, 2010 12:34 am
by nemesis
hi there!

searching for a useroption for the autoinsert for singlematches in the codecompletion i didn't find any. so here's a patchoffer for latest trunk (4428) and latest stable (4375 - which also includes the autocompletion patch from http://codelite.org/forum/viewtopic.php?f=13&t=1127).

the patch adds the useroption in the tagsmenu and modifies both ShowCompletionBox functions in cl_editor.cpp:2862 and 2908.
In

Code: Select all

void LEditor::ShowCompletionBox(const std::vector<TagEntryPtr>& tags, const wxString& word, wxEvtHandler* owner)
the autoinsert was hardset to false (used for abbreviations and clang-completion). i however found it confusing having an option for it and not affecting all cases, so i added it there, too.
In

Code: Select all

void LEditor::ShowCompletionBox(const std::vector<TagEntryPtr>& tags, const wxString& word, bool showFullDecl, bool autoHide, bool autoInsertSingleChoice)
the autoinsert was set by the variable autoInsertSingleChoice, which makes it obsolete now to set it in the code because it gets overridden by the usersetting.
defaultsetting is 'on', since this is, what the prototype gets initialized with in cl_editor.h:472.

greets,
nem

edit: rewrote the patch for revision 4433

Re: patchoffer for 4428 and 4375: autoinsert useroption

Posted: Fri Oct 08, 2010 9:08 pm
by eranif
the layout of the tags options dialog was modified completely, can u re-post the patch?

Eran

Re: patchoffer for 4433 and 4375: autoinsert useroption

Posted: Fri Oct 08, 2010 10:33 pm
by nemesis
done and replaced.

greets,
nem

Re: patchoffer for 4433 and 4375: autoinsert useroption

Posted: Sat Oct 09, 2010 3:03 pm
by foxmuldr
nemesis wrote:done and replaced.
Awesome work, nem. Thanks!

- Rick

Re: patchoffer for 4433 and 4375: autoinsert useroption

Posted: Sun Oct 10, 2010 2:30 pm
by foxmuldr
Eran, thank you for implementing this patch. I know you said you don't use it, but many of us do. I also like the new layout with tick marks.

- Rick