summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-06-11 15:31:53 +0200
committerSebastien Helleu <flashcode@flashtux.org>2009-06-11 15:31:53 +0200
commit652a97cc7af805e5cbbd2671d5a98998188ab041 (patch)
tree9dcfe216f4e02b9bf28eda8a6a83e3e2133f0822 /src
parent3912c1bae6b5bf318049d274e155684d96997ff8 (diff)
downloadweechat-652a97cc7af805e5cbbd2671d5a98998188ab041.zip
Fix display bug with color/attribute chars (< 32) in command line (bug #26749)
Diffstat (limited to 'src')
-rw-r--r--src/gui/gui-chat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/gui-chat.c b/src/gui/gui-chat.c
index 80f11e611..ff45be3fa 100644
--- a/src/gui/gui-chat.c
+++ b/src/gui/gui-chat.c
@@ -129,7 +129,7 @@ gui_chat_strlen_screen (const char *string)
string = gui_chat_string_next_char (NULL, (unsigned char *)string, 0);
if (string)
{
- size_on_screen = utf8_char_size_screen (string);
+ size_on_screen = (string[0] < 32) ? 1 : utf8_char_size_screen (string);
if (size_on_screen > 0)
length += size_on_screen;
string = utf8_next_char (string);
@@ -183,7 +183,7 @@ gui_chat_string_real_pos (const char *string, int pos)
0);
if (ptr_string)
{
- size_on_screen = utf8_char_size_screen (ptr_string);
+ size_on_screen = (ptr_string[0] < 32) ? 1 : utf8_char_size_screen (ptr_string);
if (size_on_screen > 0)
pos -= size_on_screen;
ptr_string = utf8_next_char (ptr_string);