When inline-selection is set, and the completion popup is showing,
pressing left abruptly jumps to the beginning of the entry text.
This is not expected, since the cursor is at the end of the text before
the left key is pressed, and this behavior is completely inconsistent
with how an entry would normally behave.
The behavior can be observed in Epiphany by selecting a completion match
and pressing left.
This patch changes the code so that it just runs the default entry key
press keybindings in such a case.
https://bugzilla.gnome.org/show_bug.cgi?id=677915
gtk_entry_set_text (GTK_ENTRY (completion->priv->entry), "");
}
- /* Move the cursor to the end for Right/Esc, to the
- beginning for Left */
+ /* Move the cursor to the end for Right/Esc */
if (event->keyval == GDK_KEY_Right ||
event->keyval == GDK_KEY_KP_Right ||
event->keyval == GDK_KEY_Escape)
gtk_editable_set_position (GTK_EDITABLE (widget), -1);
+ /* Let the default keybindings run for Left, i.e. either move to the
+ * previous character or select word if a modifier is used */
else
- gtk_editable_set_position (GTK_EDITABLE (widget), 0);
+ retval = FALSE;
}
keypress_completion_out: