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?
This commit is contained in:
parent
3ecadc0a8e
commit
eb4916344b
@ -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_); }
|
||||
|
Loading…
Reference in New Issue
Block a user