-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scope: Improved evaluation on-hover #823
scope: Improved evaluation on-hover #823
Conversation
Just from the top of my head, wouldn't it be better to evaluate Also if you wanted to be thorough, the C and C++ syntax allows for any kind of spaces between |
Yes, good idea. I'll try to implement that.
True. But and it might even include linebreaks I think. And for C++ we might need to allow |
@b4n, @elextr: I just pushed another improvement for the on-hover-evaluation of expressions. It works like suggested by b4n and also allows spaces but it does only work on the current line. I wanted to write unit tests for the function that parses the current line and extracts the expression to evaluate. But my unit tests don't build. I have setup an extra folder
So it seems that I have overseen one magic autotools switch which is still missing. Any help would be highly appreciated. |
Junk! I simply forgot to install check on my machine (embarrassing). For anyone reading this: make sure you have check installed if you want to write unit tests. Otherwise you might get an error message like this: If you execute the command In case check is installed it will show |
b4b7380
to
f8ee04b
Compare
Scope automatically evaluates an expression if the mouse pointer is hovered over it. But before this change it only evaluated words. E.g. if the mouse was hovered over "structa->item1" then scope would have evaluated "structa" or "item1" depending on the exact position of the mouse pointer. With this change it will instead evaluate the value of "structa" if the mouse pointer is over "structa". If the mouse pointer is over "item1" then the expression "structa->item1" will be evaluated.
f8ee04b
to
648224a
Compare
This looks quite good to me now. Unit tests worked and were run successfully on my machine. Unfortunately scope isn't build in Travis CI as VTE support is missing. The array in |
@frlan: I would also like to have this one in milestone 1.36.0 - if no one objects. |
No complaints, so I merge this now. |
Scope automatically evaluates an expression if the mouse pointer is hovered over it. But before this change it only evaluated words. E.g. if the mouse was hovered over
structa->item1
then scope would have evaluatedstructa
oritemb
depending on the exact position of the mouse pointer. With this change it will instead evaluate the value ofstructa->item1
.