After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772389 - Appending a character to a GtkEntry control in overwrite mode rings the bell
Appending a character to a GtkEntry control in overwrite mode rings the bell
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkEntry
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-10-04 06:11 UTC by Ian Macdonald
Modified: 2016-10-11 11:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for v2.24.31 (809 bytes, patch)
2016-10-04 06:11 UTC, Ian Macdonald
committed Details | Review

Description Ian Macdonald 2016-10-04 06:11:32 UTC
Created attachment 336853 [details] [review]
Patch for v2.24.31

When the cursor is positioned at the end of the existing text and characters are added in overwrite mode, the error bell will ring for each character.

This is happening because in overwrite mode, gtk_entry_enter_text() deletes one character before adding the new character, and at the end of the text, there's nothing to delete so the delete fails and the bell rings.

This can be reproduced as follows:
 * Open gedit
 * Press Ctrl-F to open the search control
 * Press Insert to switch to overwrite mode
 * Start typing

The fix I've put in is to check the text length before deleting, and only do the delete if current position is less than the text length.

A patch has been attached for v2.24.31, which is what we need; the same bug exists on v3.20 according to the git browser interface, I haven't checked anything later than that.