From 7187784936edc640d547ad497ef9b644a2483a2e Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 17 Aug 2021 20:40:30 +1000 Subject: Move control character escaping responsibility to the terminal UI Fix atom text at display time, allow tabs/eol/etc... in display atoms and escape them just-in-time Fixes #4293 --- src/display_buffer.cc | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'src/display_buffer.cc') diff --git a/src/display_buffer.cc b/src/display_buffer.cc index b7564550..e7caed04 100644 --- a/src/display_buffer.cc +++ b/src/display_buffer.cc @@ -332,22 +332,4 @@ DisplayLine parse_display_line(StringView line, const FaceRegistry& faces, const return res; } -String fix_atom_text(StringView str) -{ - String res; - auto pos = str.begin(); - for (auto it = str.begin(), end = str.end(); it != end; ++it) - { - char c = *it; - if (c >= 0 and c <= 0x1F) - { - res += StringView{pos, it}; - res += String{Codepoint{(uint32_t)(0x2400 + c)}}; - pos = it+1; - } - } - res += StringView{pos, str.end()}; - return res; -} - } -- cgit v1.2.3