From 0ba8b922a2f2b2cbc51bc09906ac6e71f804b275 Mon Sep 17 00:00:00 2001 From: TingPing Date: Tue, 9 Dec 2014 23:03:44 -0500 Subject: Fix tab completing with no completion char --- src/fe-gtk/fkeys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fe-gtk') diff --git a/src/fe-gtk/fkeys.c b/src/fe-gtk/fkeys.c index d1388b9f..3c8745e7 100644 --- a/src/fe-gtk/fkeys.c +++ b/src/fe-gtk/fkeys.c @@ -1678,8 +1678,8 @@ key_action_tab_comp (GtkWidget *t, GdkEventKey *entry, char *d1, char *d2, if (prefix_len) g_string_append_len (buf, text, offset_to_len (text, prefix_len)); g_string_append (buf, result); - if((!prefix_len || has_nick_prefix) && is_nick) - g_string_append_unichar (buf, g_utf8_get_char_validated ((const char*)&prefs.hex_completion_suffix, -1)); + if((!prefix_len || has_nick_prefix) && is_nick && prefs.hex_completion_suffix[0] != '\0') + g_string_append_unichar (buf, g_utf8_get_char_validated (prefs.hex_completion_suffix, -1)); g_string_append_c (buf, ' '); cursor_pos = buf->len; if (postfix) -- cgit 1.4.1