From 5a6922a0458c3eb19aa5a23e1050af2a1a027fcd Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 18 Jul 2013 21:58:11 +0200 Subject: [PATCH] expand_unprintable: use iscntrl rather than isprint which does not work as expected --- src/highlighters.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/highlighters.cc b/src/highlighters.cc index 7c5db277..0bdd81eb 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -315,7 +315,7 @@ void expand_unprintable(const Window& window, DisplayBuffer& display_buffer) end = buffer.iterator_at(atom_it->content.end()); it != end; ++it) { Codepoint cp = *it; - if (cp != '\n' and not isprint((int)cp)) + if (cp != '\n' and iscntrl((int)cp)) { std::ostringstream oss; oss << "U+" << std::hex << cp;