text: Don't accept new line characters in single line mode
Modified Return key presses don't trigger ::activate so we would end up adding an unprintable character to a single paragraph mode pango layout which renders it as a box. https://bugzilla.gnome.org/show_bug.cgi?id=623344
This commit is contained in:
parent
5e18c2f9b4
commit
ea50df6bb6
@ -2074,7 +2074,7 @@ clutter_text_key_press (ClutterActor *actor,
|
||||
if (key_unichar == '\r')
|
||||
key_unichar = '\n';
|
||||
|
||||
if (key_unichar == '\n' ||
|
||||
if ((key_unichar == '\n' && !priv->single_line_mode) ||
|
||||
(g_unichar_validate (key_unichar) &&
|
||||
!g_unichar_iscntrl (key_unichar)))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user