1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-23 06:35:36 +00:00

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
This commit is contained in:
Emanuele Giaquinta 2007-05-25 22:06:32 +00:00 committed by exg
parent a8741bd799
commit a429e2bf23

View File

@ -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);