Skip to content
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

Execute on mouse hovering #3

Open
Kochise opened this issue Nov 25, 2020 · 5 comments
Open

Execute on mouse hovering #3

Kochise opened this issue Nov 25, 2020 · 5 comments

Comments

@Kochise
Copy link
Contributor

Kochise commented Nov 25, 2020

Hi, despite popupForSelectedExpression = False if pyPadStart.py, once the kernel starts evaluating (with either pyPadExecute.py or pyPadRestart.py getting triggered), everything gets evaluated as soon as the mouse hover it, even not moving the pouse, it cycles evaluation about once or twice a second (not regular timing).

Was more expecting the tooltip to appears instead.

I've tried setting CT_expression = False in __init__.py:636 (which I guess should be the correct default value, regarding the comment in pyPadStart.py) but to no avail.

Any guess ? Something wrong in def onMouseDwell(self, args) that triggers the evaluation upon mouse position ?

Regards.

@bitagoras
Copy link
Owner

Can you give me an example to better describe your problem? What do you mean by "gets evaluated"? Is the whole line executed?
The CT_expression = True should remain, otherwise the evaluation of an unselected variable below the curser will not work any more by the keyboard shortcut (e.g. shift-ctrl-space).

@Kochise
Copy link
Contributor Author

Kochise commented Nov 27, 2020

Basically, when opening the pyPadDemo_py3.py file, clicking on the 1+2 statement (line 14), pressing Shift+Enter you get the expected 3 result printed in the console, but again and again as your mouse cursor stays over it, and when you point on another line with the mouse, not even selecting it, the line under the cursor gets executed as well, again and again.

PyPadPlusPlus_MouseHovering

@bitagoras
Copy link
Owner

This look like a problem of the mouse middle button which always executes the line. You can disable it by commenting out the line
self.onTimerMiddleButton() # start periodic timer to check state of middleButton
Do you use the 64bit version of Notepadd++? There is a problem with 64 bit and the mouse middle button.

@Kochise
Copy link
Contributor Author

Kochise commented Nov 27, 2020

No, I always use the 32 bit version, I'll try the solution you provided and give an update.

@Kochise
Copy link
Contributor Author

Kochise commented Nov 28, 2020

Seems like it comes from my Logitech G600 middle button that gave me a middle finger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants