Commit 781eda5
committed
fix: Disable menu filtering on legacy Windows console
Calling terminal.get_cursor_pos() when using the legacy Windows Console
Host resulted in the program hanging waiting for a response on stdin to
an escape sequence that the terminal didn't respond to.
Enabling VT mode temporarily made it respond and provide a cursor
position, but either the return values differed from how a modern
terminal would report them or this interacted strangely with menu
rendering in some other way, as this resulted in parts of menus being
rendered to the wrong locations on any menu with a filter text field.
To work around this, we now simply detect whether VT mode is enabled,
and if it isn't, we disable the filter text field. This allows menus to
mostly work, just without the ability to search by typing.1 parent 4d31d6f commit 781eda5
2 files changed
+39
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
138 | 142 | | |
139 | | - | |
140 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
141 | 147 | | |
142 | 148 | | |
143 | 149 | | |
| |||
381 | 387 | | |
382 | 388 | | |
383 | 389 | | |
384 | | - | |
| 390 | + | |
385 | 391 | | |
386 | 392 | | |
387 | 393 | | |
388 | 394 | | |
389 | 395 | | |
390 | 396 | | |
391 | 397 | | |
392 | | - | |
| 398 | + | |
393 | 399 | | |
394 | 400 | | |
395 | 401 | | |
396 | 402 | | |
397 | 403 | | |
398 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
399 | 408 | | |
400 | 409 | | |
401 | 410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | 38 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | 39 | | |
47 | 40 | | |
48 | 41 | | |
| |||
76 | 69 | | |
77 | 70 | | |
78 | 71 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | 72 | | |
99 | 73 | | |
100 | 74 | | |
| |||
112 | 86 | | |
113 | 87 | | |
114 | 88 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 89 | + | |
120 | 90 | | |
121 | | - | |
| 91 | + | |
| 92 | + | |
122 | 93 | | |
123 | | - | |
124 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
125 | 105 | | |
126 | 106 | | |
127 | 107 | | |
| |||
147 | 127 | | |
148 | 128 | | |
149 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
150 | 138 | | |
151 | 139 | | |
152 | 140 | | |
153 | 141 | | |
| 142 | + | |
| 143 | + | |
154 | 144 | | |
155 | 145 | | |
156 | 146 | | |
| |||
0 commit comments