Commit c9d4dbf
committed
fix: implement standard autocomplete dismiss behavior
Implemented VSCode/IntelliJ-style autocomplete behavior to fix duplicate windows and improve UX.
**Features:**
- Standard dismiss pattern: keep open when clicking sidebar/panels, dismiss only on text cursor move, invalid chars, or ESC
- Fixed duplicate windows by dismissing old window before showing new one in SQLCompletionWindowController
- Tab switch dismisses all autocomplete windows via NotificationCenter broadcast
- Added mouseDown override in EditorTextView to detect clicks at different cursor positions
**Technical changes:**
- EditorTextView: Added onClickOutsideCompletion callback and mouseDown override
- EditorCoordinator: Wired callbacks, added tab switch notification observer, simplified showCompletions logic
- MainContentView: Post QueryTabDidChange notification on tab switch
- SQLCompletionWindowController: Dismiss existing window before showing new one
Autocomplete now behaves like professional code editors with no duplicate windows.1 parent 8198db3 commit c9d4dbf
File tree
4 files changed
+52
-2
lines changed- OpenTable/Views
- Editor
4 files changed
+52
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
87 | 108 | | |
88 | 109 | | |
89 | 110 | | |
| |||
163 | 184 | | |
164 | 185 | | |
165 | 186 | | |
166 | | - | |
167 | 187 | | |
168 | 188 | | |
169 | 189 | | |
| |||
189 | 209 | | |
190 | 210 | | |
191 | 211 | | |
192 | | - | |
| 212 | + | |
193 | 213 | | |
194 | 214 | | |
195 | 215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
186 | 189 | | |
187 | 190 | | |
188 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
189 | 209 | | |
190 | 210 | | |
191 | 211 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
201 | 204 | | |
202 | 205 | | |
203 | 206 | | |
| |||
0 commit comments