GNOME Bugzilla – Bug 772389
Appending a character to a GtkEntry control in overwrite mode rings the bell
Last modified: 2016-10-11 11:24:03 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.