Mercurial > vim
comparison src/term.c @ 30602:001c228efdab v9.0.0636
patch 9.0.0636: underline color may not work in some terminals
Commit: https://github.com/vim/vim/commit/b393275ae91eb9a8df7a9a611bd75590db9b22db
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 1 21:22:17 2022 +0100
patch 9.0.0636: underline color may not work in some terminals
Problem: Underline color does not work in terminals that don't send a
termresponse.
Solution: Do output t_8u if it was set explicitly. (closes #11253)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 01 Oct 2022 22:30:03 +0200 |
parents | 1342ee83ab97 |
children | ae1113e53ce3 |
comparison
equal
deleted
inserted
replaced
30601:6194c0ba3526 | 30602:001c228efdab |
---|---|
151 NULL | 151 NULL |
152 }; | 152 }; |
153 | 153 |
154 // The t_8u code may default to a value but get reset when the term response is | 154 // The t_8u code may default to a value but get reset when the term response is |
155 // received. To avoid redrawing too often, only redraw when t_8u is not reset | 155 // received. To avoid redrawing too often, only redraw when t_8u is not reset |
156 // and it was supposed to be written. | 156 // and it was supposed to be written. Unless t_8u was set explicitly. |
157 // FALSE -> don't output t_8u yet | 157 // FALSE -> don't output t_8u yet |
158 // MAYBE -> tried outputing t_8u while FALSE | 158 // MAYBE -> tried outputing t_8u while FALSE |
159 // OK -> can write t_8u | 159 // OK -> can write t_8u |
160 int write_t_8u_state = FALSE; | 160 int write_t_8u_state = FALSE; |
161 # endif | 161 # endif |
3009 | 3009 |
3010 void | 3010 void |
3011 term_ul_rgb_color(guicolor_T rgb) | 3011 term_ul_rgb_color(guicolor_T rgb) |
3012 { | 3012 { |
3013 # ifdef FEAT_TERMRESPONSE | 3013 # ifdef FEAT_TERMRESPONSE |
3014 if (write_t_8u_state != OK) | 3014 // If the user explicitly sets t_8u then use it. Otherwise wait for |
3015 // termresponse to be received, which is when t_8u would be set and a | |
3016 // redraw is needed if it was used. | |
3017 if (!option_was_set((char_u *)"t_8u") && write_t_8u_state != OK) | |
3015 write_t_8u_state = MAYBE; | 3018 write_t_8u_state = MAYBE; |
3016 else | 3019 else |
3017 # endif | 3020 # endif |
3018 term_rgb_color(T_8U, rgb); | 3021 term_rgb_color(T_8U, rgb); |
3019 } | 3022 } |