File tree 1 file changed +13
-6
lines changed
1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -243,13 +243,20 @@ TermGraphicsInfo QuerySupportedGraphicsProtocol() {
243
243
// Fall through, as we still have to determine if we're in tmux
244
244
}
245
245
246
- // vscode doesn't provide a way to query the terminal, but can do
247
- // iterm graphics.
246
+ // Some terminals with Windows heritage often don't support query of
247
+ // the terminal, but are set TERM_PROGRAM
248
248
const char *const term_program = getenv (" TERM_PROGRAM" );
249
- if (term_program && strcmp (term_program, " vscode" ) == 0 ) {
250
- result.preferred_graphics = GraphicsProtocol::kIterm2 ;
251
- // In case the user chooses sixel.
252
- result.sixel .known_broken_cursor_placement = true ;
249
+ if (term_program) {
250
+ if (strcmp (term_program, " vscode" ) == 0 ) {
251
+ result.preferred_graphics = GraphicsProtocol::kIterm2 ;
252
+ // In case the user chooses sixel.
253
+ result.sixel .known_broken_cursor_placement = true ;
254
+ }
255
+ else if (strcmp (term_program, " WarpTerminal" ) == 0 ) {
256
+ // At least on Mac and Linux according to #151
257
+ // (Windows support unclear)
258
+ result.preferred_graphics = GraphicsProtocol::kIterm2 ;
259
+ }
253
260
}
254
261
255
262
// Note, there is a kitty protocol way to determine if kitty is supported,
You can’t perform that action at this time.
0 commit comments