diff options
| author | Greg Ercolano <erco@seriss.com> | 2024-02-16 22:59:56 -0800 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2024-02-17 07:59:42 -0800 |
| commit | eb4916344b7cd92ac1a4aa862976808c96dbfcde (patch) | |
| tree | 070f860b03a287194199692ad784629d805141c8 /FL/Fl_Terminal.H | |
| parent | 3ecadc0a8e2acda3a13d7df5307137f10d66ef80 (diff) | |
Clear screen also clears attributes/xterm modes (#911)
Clear was setting characters to a space using the current style,
but if the style left Dim/Bold/Inverse (etc) enabled, that was being
used to affect the clear character, and thus affected clearing screen.
Seems weird tho; what if one wants to do a cleol (\033[K) on a screen
that is all inverted text; is there no way to use inverse mode for
clearing to the end of line? Or to delete a character?
Diffstat (limited to 'FL/Fl_Terminal.H')
| -rw-r--r-- | FL/Fl_Terminal.H | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/FL/Fl_Terminal.H b/FL/Fl_Terminal.H index 09673f557..1a63fdaa7 100644 --- a/FL/Fl_Terminal.H +++ b/FL/Fl_Terminal.H @@ -553,7 +553,7 @@ protected: double pwidth(void) const; int pwidth_int(void) const; // Clear the character to a 'space' - void clear(const CharStyle& style) { text_ascii(' ', style); } + void clear(const CharStyle& style) { text_utf8(" ", 1, style); charflags_ = 0; attrib_ = 0; } bool is_char(char c) const { return *text_ == c; } void show_char(void) const { ::printf("%.*s", len_, text_); } void show_char_info(void) const { ::fprintf(stderr, "UTF-8('%.*s', len=%d)\n", len_, text_, len_); } |
