mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fix editor rendering special characters to the terminal.
This commit is contained in:
parent
38f8384d78
commit
be1585488d
1 changed files with 6 additions and 0 deletions
|
@ -76,6 +76,12 @@ void update_terminal_entry(FILE* fp, struct terminal_datum entry, int x, int y,
|
|||
size_t count = wcrtomb(mb, entry.character, &ps);
|
||||
if ( count == (size_t) -1 )
|
||||
fputs("<EFBFBD>", fp);
|
||||
else if ( entry.character == L'\b' ||
|
||||
entry.character == L'\e' ||
|
||||
entry.character == L'\n' ||
|
||||
entry.character == L'\r' ||
|
||||
entry.character == L'\t' )
|
||||
fputs("<EFBFBD>", fp);
|
||||
else for ( size_t i = 0; i < count; i++ )
|
||||
fputc(mb[i], fp);
|
||||
current->data[index] = entry;
|
||||
|
|
Loading…
Add table
Reference in a new issue