summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmanuele Giaquinta <exg@irssi.org>2007-05-25 22:06:32 +0000
committerexg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564>2007-05-25 22:06:32 +0000
commita429e2bf23a4584f50df7d92b724fc34828deff9 (patch)
tree173d88444161275a1dda2e78b3460213db71b79c /src
parenta8741bd799d1e3aea02ad63329c71acfa03c67fb (diff)
downloadirssi-a429e2bf23a4584f50df7d92b724fc34828deff9.zip
Forbid insertion of a character with width 0 as the first character in
the prompt. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4519 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/fe-text/gui-entry.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/fe-text/gui-entry.c b/src/fe-text/gui-entry.c
index 4ffae832..be778224 100644
--- a/src/fe-text/gui-entry.c
+++ b/src/fe-text/gui-entry.c
@@ -460,6 +460,9 @@ void gui_entry_insert_char(GUI_ENTRY_REC *entry, unichar chr)
if (chr == 0 || chr == 13 || chr == 10)
return; /* never insert NUL, CR or LF characters */
+ if (entry->utf8 && entry->pos == 0 && mk_wcwidth(chr) == 0)
+ return;
+
gui_entry_redraw_from(entry, entry->pos);
entry_text_grow(entry, 1);