1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Merge pull request #1154 from ailin-nemui/zerowidth

refine zero width input test in empty line
This commit is contained in:
ailin-nemui 2020-02-14 20:17:50 +01:00 committed by GitHub
commit b38ae68fb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -654,7 +654,7 @@ void gui_entry_insert_char(GUI_ENTRY_REC *entry, unichar chr)
if (chr == 0 || chr == 13 || chr == 10) if (chr == 0 || chr == 13 || chr == 10)
return; /* never insert NUL, CR or LF characters */ return; /* never insert NUL, CR or LF characters */
if (entry->utf8 && entry->pos == 0 && i_wcwidth(chr) == 0) if (entry->utf8 && entry->pos == 0 && unichar_isprint(chr) && i_wcwidth(chr) == 0)
return; return;
gui_entry_redraw_from(entry, entry->pos); gui_entry_redraw_from(entry, entry->pos);