godotengine / godot

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

Unintentional code selection #96781

Open Torguen opened 1 month ago

Torguen commented 1 month ago

Tested versions

v4.4.dev1.official [28a72fa43] v3.6.stable.official [de2f0f147]

System information

w10 64

Issue description

Watch the video. Place the cursor at the top or in an area that leaves code to be able to reproduce the problem. Select the second digit of the code line. The caret moves to the bottom line and the text on the top line is selected

v4.4.dev1.official [28a72fa43]

https://github.com/user-attachments/assets/c5585171-2e98-4ed9-9e29-dc350ab36100

This also happens in 3.6 stable in a different way. In 3.6 stable, select the area where breakpoints are created. With the click held down, drag a little.

v3.6.stable.official [de2f0f147]

https://github.com/user-attachments/assets/33a8a367-354f-4c8f-a47f-6f98fc8b023f

Steps to reproduce

See the videos

Minimal reproduction project (MRP)

...

kitbdev commented 1 month ago

In the 4.x version this behavior is intentional. Clicking on the line number selects the entire line (this includes the newline so the cursor goes to the start of the next line). You can also click and drag to select multiple entire lines. Other IDEs like VSCode have this behavior as well.

Edit: When clicking on the other gutters it should not make a selection.