From bc8a9d82c3f028681c3f78075110bdd17326d679 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 22 Feb 2020 08:36:51 +1100 Subject: [PATCH] Use Control Picture codepoints in prompt for all codepoints < 0x22 Fixes #3333 --- src/display_buffer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/display_buffer.cc b/src/display_buffer.cc index 7df0aa1e..03a99c7b 100644 --- a/src/display_buffer.cc +++ b/src/display_buffer.cc @@ -325,10 +325,10 @@ String fix_atom_text(StringView str) for (auto it = str.begin(), end = str.end(); it != end; ++it) { char c = *it; - if (c == '\n' or c == '\r') + if (c <= 0x21) { res += StringView{pos, it}; - res += c == '\n' ? "␤" : "␍"; + res += String{Codepoint{(uint32_t)(0x2400 + c)}}; pos = it+1; } }