summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/autocomplete.py
diff options
context:
space:
mode:
authorTal Einat <532281+taleinat@users.noreply.github.com>2021-05-03 02:27:38 (GMT)
committerGitHub <noreply@github.com>2021-05-03 02:27:38 (GMT)
commitb43cc31a270d0dacbc69e35d6c6fbdb5edd7e711 (patch)
treef656c691cf80d2b927037808ea51d4f75ae20a16 /Lib/idlelib/autocomplete.py
parent90d523910a61290597b4599f17363b532f0a4411 (diff)
downloadcpython-b43cc31a270d0dacbc69e35d6c6fbdb5edd7e711.zip
cpython-b43cc31a270d0dacbc69e35d6c6fbdb5edd7e711.tar.gz
cpython-b43cc31a270d0dacbc69e35d6c6fbdb5edd7e711.tar.bz2
bpo-37903: IDLE: add shell sidebar mouse interactions (GH-25708)
Left click and drag to select lines. With selection, right click for context menu with copy and copy-with-prompts. Also add copy-with-prompts to the text-box context menu. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Diffstat (limited to 'Lib/idlelib/autocomplete.py')
-rw-r--r--Lib/idlelib/autocomplete.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/idlelib/autocomplete.py b/Lib/idlelib/autocomplete.py
index e1e9e17..bb7ee03 100644
--- a/Lib/idlelib/autocomplete.py
+++ b/Lib/idlelib/autocomplete.py
@@ -31,10 +31,11 @@ TRIGGERS = f".{SEPS}"
class AutoComplete:
- def __init__(self, editwin=None):
+ def __init__(self, editwin=None, tags=None):
self.editwin = editwin
if editwin is not None: # not in subprocess or no-gui test
self.text = editwin.text
+ self.tags = tags
self.autocompletewindow = None
# id of delayed call, and the index of the text insert when
# the delayed call was issued. If _delayed_completion_id is
@@ -48,7 +49,7 @@ class AutoComplete:
"extensions", "AutoComplete", "popupwait", type="int", default=0)
def _make_autocomplete_window(self): # Makes mocking easier.
- return autocomplete_w.AutoCompleteWindow(self.text)
+ return autocomplete_w.AutoCompleteWindow(self.text, tags=self.tags)
def _remove_autocomplete_window(self, event=None):
if self.autocompletewindow: