Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selecting words in the code editor treats backticks different from other similar punctuation. #91565

Closed
skysphr opened this issue May 4, 2024 · 3 comments

Comments

@skysphr
Copy link
Contributor

skysphr commented May 4, 2024

Tested versions

4.2.stable

System information

Godot v4.2.2.rc (2dab9dc55) - Arch Linux #1 SMP PREEMPT_DYNAMIC Thu, 29 Feb 2024 19:08:51 +0000 - Wayland - Vulkan (Mobile) - dedicated AMD Radeon RX 580 Series (RADV POLARIS10) () - AMD Ryzen 7 2700 Eight-Core Processor (16 Threads)

Issue description

In the following code

var string1 = "|word1| `word2` 'word3'"
var string2 = '[word1] `word2` "word3"'

everything behaves as expected except for word2 on both lines. When selecting it via double click or via Ctrl+left arrow, the selection will include the left backtick. Selecting via Ctrl+right arrow works fine. Interestingly, if you remove the quotes and let the backticks roam free in the editor (not that it would make any sense doing that as it is not valid syntax), they are both treated as alphanumerics, getting selected together with the rest of the word.

Now I agree this is a minor annoyance and probably irrelevant for 99.9% of users, but maybe 3 years from now someone (or me) will be bored and decide to fix this random bug.

Steps to reproduce

Paste the above snippet in Godot's code editor and try selecting stuff with double click and Ctrl+arrows.

Minimal reproduction project (MRP)

N/A

@AThousandShips
Copy link
Member

AThousandShips commented May 4, 2024

Backtick isn't punctuation or an operator in GDScript so I'd expect this to treat it as part of the word

@wyattbiker
Copy link

Is it related to Double clicking on a word can select prior not character symbol #69254

@kitbdev
Copy link
Contributor

kitbdev commented Jun 30, 2024

@Calinou Calinou closed this as completed Jun 30, 2024
@Calinou Calinou added this to the 4.3 milestone Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants