I an open note:
I am able to reproduce this issue on Windows, and will report it to Development.
This issue has been fixed in the new text editor in 5.1. It is working as expected in 5.1 Beta 4, but could have been fixed in earlier versions of 5.1.