Page 1 of 1

Request : set current parameter in bold in code completion

Posted: Wed Dec 17, 2008 5:48 pm
by kortyburns
Suppose a function has 6 parameters : a,b,c,d,e,f.

Using ctrl+shift+space command displays the whole parameters's list, but when a function has several parameters, it s difficult to see which one we are currently writting. I propose the VStudio manner, which displays in bold the current parameter.

example :

Code: Select all

my_func(a,b,c,
Here, the hint window that appeared using ctrl+shift+space could display, in bold, the 'e' parameter, so the user knows the current parameter he is writing is the 4th one.

Re: Request : set current parameter in bold in code completion

Posted: Wed Dec 17, 2008 6:19 pm
by eranif
There is one flaw with this design:
This is scintilla's API to implement what you suggested:

Code: Select all

// Highlight a segment of the definition.
void CallTipSetHighlight (int startPos, int endPos);
This will work nice in most cases, however, codelite calltip is a bit different, if you use overloading:

Code: Select all

void foo(int i, int j);
void foo(std::string str);
the calltip typing:

Code: Select all

foo(
is

Code: Select all

foo(int i, int j)
foo(std::string str)
Note that the calltip is 2 lines, however I would lke to colour both int i AND std::string str, so the calltip will look like:

foo(int i, int j)
foo(std::string str)

and this is not possible currently with the current API

Eran