Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

Code completion with partial matching

<< < (2/9) > >>

dmoore:

--- Quote from: Alpha on January 18, 2014, 07:46:51 pm ---
--- Quote from: dmoore on January 18, 2014, 05:05:52 pm ---PS: Seems to be small bug with placement of doc string window. Sometimes it places on left when there clearly isn't room for the whole window.

--- End quote ---
Well, that was supposed to be a feature.  Does it act unexpectedly?

--- End quote ---

It gets cut off when being displayed on the left side. Maybe the same would have happened on the right side too, but I didn't think so (if that's the case, then maybe the window just needs to be resized). I was using a 1080p display on a dual monitor setup. The 1080p monitor is on the left, the other monitor is something less than 1080p.

dmoore:

--- Quote from: oBFusCATed on January 18, 2014, 07:57:27 pm ---
--- Quote from: Alpha on January 18, 2014, 07:46:51 pm ---It is not really an issue; only that a sort function would need to be written.

--- End quote ---
Probably it would be better to use some ranking function, converting the string to some integer and then using normal integer sorting.
Probably YouCompleteMe dev won't mind if you use theirs way of sorting.... :)

--- End quote ---

Agree. After all we're using their way of matching. (I am going to steal this for my photo manager's tag completions too!)

dmoore:
This looks to be the relevant code:

https://github.com/Valloric/YouCompleteMe/blob/master/cpp/ycm/Result.cpp#L141

But I think it would be simpler (and almost certainly faster!) to just compute an integer priority for each item as oBFus mentioned.

Alpha:

--- Code: (see attached) ---++hack;
--- End code ---

Alpha:

--- Quote from: dmoore on January 18, 2014, 08:12:31 pm ---
--- Quote from: Alpha on January 18, 2014, 07:46:51 pm ---
--- Quote from: dmoore on January 18, 2014, 05:05:52 pm ---PS: Seems to be small bug with placement of doc string window. Sometimes it places on left when there clearly isn't room for the whole window.

--- End quote ---
Well, that was supposed to be a feature.  Does it act unexpectedly?

--- End quote ---
It gets cut off when being displayed on the left side. Maybe the same would have happened on the right side too, but I didn't think so (if that's the case, then maybe the window just needs to be resized). I was using a 1080p display on a dual monitor setup. The 1080p monitor is on the left, the other monitor is something less than 1080p.

--- End quote ---
Confirmed.  (And also confirmed that it is the fault of this hack interacting with another component of CCManager.)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version