Unicode character splits when Backspacing, but not when Deleting
System information
What is your operating system and version? (e.g. "Linux, Fedora 36" or "macOS 10.15.3")
Fedora 36
What is the version of GNOME Text Editor? (e.g. "42.0-1.fc36.x86_64" or "commit 14e494")
Version 43.2 (installed via Flatpak from Flathub)
Text Editor (43.2)
Flatpak: yes
GLib: 2.74.4 (2.74.4)
GTK: 4.8.3 (4.8.3)
GtkSourceView: 5.6.2 (5.6.1)
Libadwaita: 1.2.1 (1.2.0)
Enchant2: 2.2.15
gtk-theme-name: Adwaita-empty
GTK_THEME: unset
org.gnome.TextEditor restore-session = true
org.gnome.TextEditor recolor-window = true
org.gnome.TextEditor show-map = true [default=false]
org.gnome.TextEditor custom-font = 'FantasqueSansMono Nerd Font 17' [default='Monospace 11']
org.gnome.TextEditor show-line-numbers = true [default=false]
org.gnome.TextEditor style-scheme = 'kate-dark' [default='Adwaita']
org.gnome.TextEditor wrap-text = true
org.gnome.TextEditor style-variant = 'follow'
org.gnome.TextEditor indent-style = 'space' [default='tab']
org.gnome.TextEditor show-right-margin = true [default=false]
org.gnome.TextEditor spellcheck = false [default=true]
org.gnome.TextEditor auto-indent = true
org.gnome.TextEditor use-system-font = false [default=true]
org.gnome.TextEditor keybindings = 'default'
org.gnome.TextEditor highlight-current-line = false
org.gnome.TextEditor last-save-directory = ''
org.gnome.TextEditor auto-save-delay = uint32 3
org.gnome.TextEditor discover-settings = true
org.gnome.TextEditor enable-snippets = false
org.gnome.TextEditor line-height = 1.2
org.gnome.TextEditor indent-width = -1
org.gnome.TextEditor show-grid = false
org.gnome.TextEditor draw-spaces = @as []
org.gnome.TextEditor right-margin-position = uint32 80
org.gnome.TextEditor tab-width = uint32 4 [default=uint32 8]
Bug information
Steps to reproduce
- Step by step, how can you make the problem appear?
- List those steps here.
- If the problem doesn't happen every time, note that as well.
- If on GNOME or using
ibus
as input manager on KDE, enter the Unicode "Not Equal To" symbol with Ctrl+Shift+u, 2260, Enter. Or, copy and paste the symbol from https://unicode-table.com/en/2260/ - Hit Backspace. The slash through the equals sign is deleted.
- Hit Backspace again. The equals sign is deleted.
Current behaviour
What happened that made it evident there was a problem? Copy and paste the exact text of any error messages. Use code blocks (```) to format them.
Not sure this is technically a "bug", but this is unexpected/odd behavior that is shared by some other editors I've tried (Norka, Apostrophe), but doesn't happen in other editors (ghostwriter, VSCode and variants, LibreOffice Writer). Also, the same character is deleted with a single stroke of Backspace in GNOME Terminal.
Basically, this Unicode symbol "≠", as seen at the URL above, is listed as a single Unicode character. Yet when hitting Backspace after entering the symbol, GNOME Text Editor acts like it's deleting part of a set of multiple "combining" Unicode characters. First it deletes the slash, then the equals sign.
The other editors mentioned treat this Unicode character as a single character when Backspacing.
GNOME Text Editor also treats this as a single character if you place the cursor behind the character and use the Delete key to delete it "forward" as opposed to deleting it "backward" with Backspace. It's odd that deleting from one direction treats the character differently.
I can create accented Unicode characters like "é", and other mathematical operator characters like "±", they get deleted as a single character with Backspace.
There are true "combining" Unicode characters that will overlap with other characters on the screen (mostly diacritic accents) but are actually entered separately. It is understandable that most editors treat such characters as separate entities when Backspacing or Deleting. But this is not (according to the Unicode table) one of those "combining" characters.
Is there any error information in the system journal? You may be able
to find errors using (sudo journalctl -xb
).
Not that kind of bug.
Expected behaviour
What did you expect to see instead?
Expected that the "Not Equal To" (U+2260) character and anything similar that is not listed as a "combining" Unicode character would be treated like a single character by the Backspace key when editing, as it is by the Delete key.
NOTE: Just to be sure it has nothing to do with the font, I disabled the custom font choice and tried again, it does the same thing with the default font.