Autocomplete keeps the text that is entered before hitting Tab

Problem description:
When writing code I will often use the autocomplete to fill out as I write. For example, variable names, classes, methods, etc. I type the first few letters, the autosuggest popup appears, then I hit ‘tab’ or ‘enter’ to accept the suggestion and it works.

However, there is a case where the autocorrect does not work properly. When it suggests “end” to finish off a class definition or an if statement, I try to hit ‘tab’ or ‘enter’ to accept the suggestion and about 70% of the time the autocomplete fails. Instead of giving me “end” it retains part of what I typed and concatenates ‘end’ to it. So the result after I hit tab is “enend”.

In the above example: I typed “en” then hit tab to autocomplete to end and the result is the original ‘en’ concatenated with the autocomplete ‘end.’ See Screenshot.

Obviously, this is super annoying because I’m constantly forced to go back to clean up these situations.

Expected behavior:

Autocomplete should work when I hit tab or enter on the ‘end’ suggestion.

Actual behavior:

Autocomplete works for everything except ‘end’. ‘end’ autocomplete only works 30% of the time. When not working, it will concatenate instead of replace. Resulting in what you see in the screenshot.

Steps to reproduce:
I’m writing in Ruby/Ruby on Rails. Define a class or method and try to use autocomplete for the “end.”

Bug appears at this link:


Opera/Windows 10/Desktop PC