godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
87.11k stars 19.57k forks source link

Inconsistent editor movement near arithmetic operators #92981

Open 1xhitt opened 1 month ago

1xhitt commented 1 month ago

Tested versions

Godot Engine v4.2.1.stable.official.b09f793f5

System information

Linux (Pop!_OS 22.04 LTS)

Issue description

Ctrl + left/right moves cursor inconsistently. It skips some operators and stops at others. This is particularly annoying with + and - operators.

Steps to reproduce

Example code

    num1 = num0 + c1 
    num1 = num0 - c1

Setting the cursor in the line 1 and pressing ctrl + left twice will put it before +. Doing so with the line 2 will put the cursor before num0.

Minimal reproduction project (MRP)

    #moves to the operator
    num1 = num0 + c1
    num1 = num0 ^ c1
    num1 = num0 > c1
    num1 = num0 >= c1
    num1 = num0 <= c1
    num1 = num0 < c1
    num1 = num0 == c1
    num1 = num0 << c1
    num1 = num0 >> c1
    num1 = num0 | c1

    # moves to the center of `!=` 
    num1 = num0 != c1

    # moves to `num0`
    num1 = num0 - c1
    num1 = num0 & c1
    num1 = num0 * c1
    num1 = num0 ** c1
    num1 = num0 / c1
    num1 = num0 % c1
    num1 = num0 % c1
    num1 = num0 % c1
AThousandShips commented 1 month ago

Please try with 4.2.2 to make sure this still occurs and hasn't been fixed already

1xhitt commented 1 month ago

Behavior does not change in Godot Engine v4.2.2.stable.official.15073afe3

jimmylynch commented 1 month ago

I would like to be assigned to this issue.

AThousandShips commented 1 month ago

We don't assign people to issues, and the first step would be to identify what's going on and to decide what to do, so if you want to investigate that that'd be great! And report your findings here

kitbdev commented 1 month ago
kitbdev commented 3 weeks ago

However, the caret skips the operator and goes to num0 in the example, when it should stop after the operator. This also affects word delete and word backspace.