Lazarus

Programming => Packages and Libraries => SynEdit => Topic started by: Pascal on April 19, 2017, 08:47:29 pm

Title: Feature Request: "Current Class/porc Hint" depending on top line
Post by: Pascal on April 19, 2017, 08:47:29 pm
Why does the "Current Class/Proc Hint" depend on the cursor position?
Shouldn't only the top line be the reference for what hint to show?
Title: Re: Feature Request: "Current Class/porc Hint" depending on top line
Post by: Martin_fr on April 19, 2017, 10:22:07 pm
The reason for the current behaviour is, that if the caret is outside a block (i.e you are editing another block further down), then it is less likely that the block on top is of interest.

The hint is about the code, that your are editing at current. That is why it follows the caret.
If you are not in the top most block, then the procedure declaration is already visible, so it is not shown. (It's like some html editors showing you the list of opening tags in which the *current* element is nested / same here "current element", not "top most visible")


Also, this means less "flickering" of the top hint, when you are scrolling down (caret at bottom of screen, cursor down key in use)

I think the current behaviour should be kept. But there is no issue with adding an option, and have your desired behaviour too. (Just needs to find someone to implement it / code is in ide/SynSourceEditor (or SourceSynEditor))
Title: Re: Feature Request: "Current Class/porc Hint" depending on top line
Post by: Pascal on April 19, 2017, 10:31:48 pm
Ah, okay, now i understand the reason for the current behaviour.
For me the topline hint is an info of what is in front of top line to have better orientation.
So maybe i will implement an option for this behaviour.