File tree
3 files changed
+131
-27
lines changed- Lib/idlelib
- idle_test
- Misc/NEWS.d/next/IDLE
3 files changed
+131
-27
lines changedLines changed: 11 additions & 6 deletions
<
10000
table aria-label="Diff for: Lib/idlelib/autocomplete.py" class="tab-size width-full DiffLines-module__tableLayoutFixed--YZcIJ" data-diff-anchor="diff-6d33dcd15a5d9d4d3754c8fa2968ee0731f2d54645b8141a278c14566f9d531f" data-tab-size="8" data-paste-markdown-skip="true" role="grid" style="--line-number-cell-width:44px;--line-number-cell-width-unified:88px">Original file line number Diff line number Diff line change
@@ -104,9 +104,14 @@ def _delayed_open_completions(self, *args):
104
104
def open_completions(self, evalfuncs, complete, userWantsWin, mode=None):
105
105
"""Find the completions and create the AutoCompleteWindow.
106
106
Return True if successful (no syntax error or so found).
107
- if complete is True, then if there's nothing to complete and no
107
+ If complete is True, then if there's nothing to complete and no
108
108
start of completion, won't open completions and return False.
109
109
If mode is given, will open a completion list only in this mode.
110
+
111
+ Action Function Eval Complete WantWin Mode
112
+ ^space force_open_completions True, False, True no
113
+ . or / try_open_completions False, False, False yes
114
+ tab autocomplete False, True, True no
110
115
"""
111
116
# Cancel another delayed call, if it exists.
112
117
if self._delayed_completion_id is not None:
@@ -117,11 +122,11 @@ def open_completions(self, evalfuncs, complete, userWantsWin, mode=None):
117
122
curline = self.text.get("insert linestart", "insert")
118
123
i = j = len(curline)
119
124
if hp.is_in_string() and (not mode or mode==COMPLETE_FILES):
120
- # Find the beginning of the string
121
- # fetch_completions will look at the file system to determine whether the
122
- # string value constitutes an actual file name
123
- # XXX could consider raw strings here and unescape the string value if it's
124
- # not raw.
125
+ # Find the beginning of the string.
126
+ # fetch_completions will look at the file system to determine
127
+ # whether the string value constitutes an actual file name
128
+ # XXX could consider raw strings here and unescape the string
129
+ # value if it's not raw.
125
130
self._remove_autocomplete_window()
126
131
mode = COMPLETE_FILES
127
132
# Find last separator or string start
Lines changed: 119 additions & 21 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
| 4 | + | |
4 | 5 |
| |
5 | 6 |
| |
| 7 | + | |
6 | 8 |
| |
7 | 9 |
| |
8 | 10 |
| |
| |||
26 | 28 |
| |
27 | 29 |
| |
28 | 30 |
| |
| 31 | + | |
29 | 32 |
| |
30 | 33 |
| |
31 | 34 |
| |
32 | 35 |
| |
33 | 36 |
| |
34 | 37 |
| |
| 38 | + | |
35 | 39 |
| |
36 | 40 |
| |
37 | 41 |
| |
| |||
53 | 57 |
| |
54 | 58 |
| |
55 | 59 |
| |
56 |
| - | |
| 60 | + | |
57 | 61 |
| |
58 | 62 |
| |
59 | 63 |
| |
| |||
66 | 70 |
| |
67 | 71 |
| |
68 | 72 |
| |
69 |
| - | |
| 73 | + | |
70 | 74 |
| |
71 | 75 |
| |
72 | 76 |
| |
73 |
| - | |
| 77 | + | |
74 | 78 |
| |
75 | 79 |
| |
76 | 80 |
| |
77 | 81 |
| |
78 |
| - | |
| 82 | + | |
79 | 83 |
| |
80 | 84 |
| |
81 | 85 |
| |
| |||
86 | 90 |
| |
87 | 91 |
| |
88 | 92 |
| |
89 |
| - | |
| 93 | + | |
90 | 94 |
| |
91 | 95 |
| |
92 | 96 |
| |
| |||
96 | 100 |
| |
97 | 101 |
| |
98 | 102 |
| |
99 |
| - | |
| 103 | + | |
100 | 104 |
| |
101 |
| - | |
| 105 | + | |
102 | 106 |
| |
103 | 107 |
| |
104 | 108 |
| |
105 | 109 |
| |
106 | 110 |
| |
107 |
| - | |
| 111 | + | |
108 | 112 |
| |
109 | 113 |
| |
110 | 114 |
| |
| |||
113 | 117 |
| |
114 | 118 |
| |
115 | 119 |
| |
116 |
| - | |
117 |
| - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
118 | 133 |
| |
119 | 134 |
| |
120 |
| - | |
121 |
| - | |
122 |
| - | |
123 |
| - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
124 | 150 |
| |
125 | 151 |
| |
126 | 152 |
| |
127 |
| - | |
128 |
| - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
129 | 170 |
| |
130 | 171 |
| |
131 | 172 |
| |
132 | 173 |
| |
133 | 174 |
| |
134 | 175 |
| |
135 |
| - | |
| 176 | + | |
| 177 | + | |
136 | 178 |
| |
137 | 179 |
| |
138 |
| - | |
139 | 180 |
| |
140 | 181 |
| |
141 | 182 |
| |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
142 | 222 |
| |
143 | 223 |
| |
144 |
| - | |
145 |
| - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
146 | 244 |
| |
147 | 245 |
| |
148 | 246 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + |
0 commit comments