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

4.2 Official Style Guide Error with Ctrl + K Shortcut #8560

Closed
Dis-One-Games opened this issue Dec 3, 2023 · 5 comments · Fixed by #8809
Closed

4.2 Official Style Guide Error with Ctrl + K Shortcut #8560

Dis-One-Games opened this issue Dec 3, 2023 · 5 comments · Fixed by #8809
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation topic:gdscript

Comments

@Dis-One-Games
Copy link

Dis-One-Games commented Dec 3, 2023

Godot version

4.2.stable

System information

Windows 11 - v4.2.stable Vulkan API 1.3.260 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1050 with Max-Q Design

Issue description

The Official Style guide found here

https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_styleguide.html

says its updated for 4.2 and if you still find outdated information, please [open an issue] linking here so sorry if this isnt the correct place.

Under the Comment spacing subheading there is a note saying:

Note:
In the script editor, to toggle the selected code commented, press Ctrl + K. This feature adds a single # sign at the start of the selected lines.

While this is correct in 4.1.x if 4.2 it seems the Ctrl + K shortcut was changed to add a # sign before the first character is a line instead of at the start of the selected line.

For example if i use the shortcut this is what would happen in 3.5-4.1 and in 4.2 to the following line

Before Ctrl + K

	I want to comment this line

3.5 - 4.1 Ctrl + K

#	I want to comment this line

4.2 Ctrl + K

	#I want to comment this line

I am unsure if this is an error with the Ctrl + K shortcut in 4.2 or a error is the style guide documentation not being updated after an intentional change.

Steps to reproduce

Create / Open a project in 4.1 and a project in 4.2 and compare how the Ctrl + K shortcut functions with tab'ed code.

Minimal reproduction project

N/A

@AThousandShips
Copy link
Member

Haven't bisected but could be a regression from:

@AThousandShips
Copy link
Member

Though on second thought, this is correct, commented out code should have no space, text should, so it's correct here I'd say, see here

@Mickeon
Copy link
Contributor

Mickeon commented Dec 3, 2023

The note in the documentation was not updated. The current behavior is what it's meant to be, and how other IDEs would do it, but had not been implemented until recently. Should probably add the Documentation tag here.

@AThousandShips
Copy link
Member

That's true missed that specific detail, as the behaviour is correct, the note should be removed, this is for the documentation repo so transferring there

@AThousandShips AThousandShips transferred this issue from godotengine/godot Dec 3, 2023
@AThousandShips AThousandShips added area:manual Issues and PRs related to the Manual/Tutorials section of the documentation good first issue labels Dec 3, 2023
@ghost
Copy link

ghost commented Jan 22, 2024

I made a PR to fix this: #8809

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation topic:gdscript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants