-
- Notifications
You must be signed in to change notification settings - Fork 33.5k
bpo-40511: fix unnecessary flashing of calltips #20910
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
Changes from 1 commit
af9a54c 228b693 687ebfa a96ae42 41573a4 7849ed9 3dd380e 2cf1351 f3bcb60 e2749fb 2ac3a6f 3ddbbe8 d12afc9 File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| | @@ -55,18 +55,46 @@ def refresh_calltip_event(self, event): | |||||||||
| self.open_calltip(False) | ||||||||||
| | ||||||||||
| def open_calltip(self, evalfuncs): | ||||||||||
| self.remove_calltip_window() | ||||||||||
| | ||||||||||
| hp = HyperParser(self.editwin, "insert") | ||||||||||
| sur_paren = hp.get_surrounding_brackets('(') | ||||||||||
| if not sur_paren: | ||||||||||
| # Not inside parentheses: Don't open a calltip, and close one if | ||||||||||
| # currently open. | ||||||||||
| ||||||||||
| if not sur_paren: | |
| # Not inside parentheses: Don't open a calltip, and close one if | |
| # currently open. | |
| if not sur_paren: # Outer call just closed by releasing ). |
See response to your response below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typing ')' is not the only case where this branch will be reached: it can also happen in various other cases via force_open_calltip_event().
terryjreedy marked this conversation as resolved. Show resolved Hide resolved
terryjreedy marked this conversation as resolved. Show resolved Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might later think about rewording or condensing the added comments, but tests are a higher priority.
terryjreedy marked this conversation as resolved. Show resolved Hide resolved
terryjreedy marked this conversation as resolved. Show resolved Hide resolved
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Typing opening and closing parentheses inside the parentheses of a function | ||
| call will no longer cause unnecessary "flashing" off and on of an existing | ||
| open call-tip, e.g. when typed in a string literal. |
Uh oh!
There was an error while loading. Please reload this page.