godotengine / godotengine/godot

Text editor caret word skip is asymmetrical depending on direction

Open
#108,398 8 comments 3 reactions 0 assignees View on GitHub
confirmed discussion topic:gui
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Reproducible in 4.3, 4.4, 4.5

### System information

Godot v4.4.1.stable - Windows 11 (build 26100) - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1660 SUPER (NVIDIA; 32.0.15.7652) - Intel(R) Core(TM) i7-10700F CPU @ 2.90GHz (16 threads)

### Issue description

When you use `Ctrl-Left` / `Ctrl-Right` or `Ctrl-Shift-Left` / `Ctrl-Shift-Right` in a text editor, the word skip is asymmetrical in how it behaviours going left vs. going right.
![Image](https://github.com/user-attachments/assets/e5eedcea-c014-4733-9b64-81dd69cc9f1c)

It makes editing very annoying, because I can't get to the word boundary I want without doing some weird logical mental gymnastics and going back and forth a few times with and without the `Ctrl` key being held down (like parallel parking for text).

I'm not sure if it's intentional, but I have never seen any other text editor behave this way. I've seen various ways of determining *where the word boundaries are*, but at least moving between them is always a *symmetrical* operation.

### Steps to reproduce

Open any script, and use `Ctrl-Left` / `Ctrl-Right` on any line of more than a few "words". Notice that whenever you go left, the caret lands on the left side of the words, but whenever you go right, the caret lands on the right side of the words, meaning you never land on the same place when you go too far and try to go back.

### Minimal reproduction project (MRP)

N/A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.