-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
Improve TextEdit and CodeEdit documentation #97656
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've suggested a few small changes to the wording that might help improve clarity.
doc/classes/CodeEdit.xml
Outdated
</description> | ||
</method> | ||
<method name="unindent_lines"> | ||
<return type="void" /> | ||
<description> | ||
Unindents selected lines, or in the case of no selection the caret line by one. Same as performing "ui_text_unindent" action. | ||
Unindents all lines that are selected or have a caret on them. Uses spaces or a tab depending on [member indent_use_spaces]. Same as performing the [member ProjectSettings.input/ui_text_dedent] action. See [method indent_lines]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unindents all lines that are selected or have a caret on them. Uses spaces or a tab depending on [member indent_use_spaces]. Same as performing the [member ProjectSettings.input/ui_text_dedent] action. See [method indent_lines]. | |
Unindents all selected lines or lines containing a caret. Uses spaces or a tab depending on [member indent_use_spaces]. Equivalent to performing the [member ProjectSettings.input/ui_text_dedent] action. See [method indent_lines]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For lines that are selected or have a caret on them
I made it this way to match other descriptions for consistency.
Also in your suggestion, it should be and
instead of or
to avoid ambiguity.
2736392
to
5f20e3f
Compare
5f20e3f
to
859e223
Compare
Added auto brace completion description in Editor Settings as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very, very much for changing these for the better. These descriptions were written really awkwardly, but there could be work to do still.
doc/classes/TextEdit.xml
Outdated
@@ -1045,7 +1045,7 @@ | |||
<param index="0" name="gutter" type="int" /> | |||
<param index="1" name="overwritable" type="bool" /> | |||
<description> | |||
Sets the gutter to overwritable. See [method merge_gutters]. | |||
If [code]true[/code], the gutter lines can be overridden when using [method merge_gutters]. See [method is_gutter_overwritable]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You used "overwritable" elsewhere too, plus that's part of name of the actual method.
If [code]true[/code], the gutter lines can be overridden when using [method merge_gutters]. See [method is_gutter_overwritable]. | |
If [code]true[/code], the gutter lines can be overwritable when using [method merge_gutters]. See [method is_gutter_overwritable]. |
Also worth keeping in mind that this makes the subject way more ambiguous. "the gutter lines" could be referring to all of the gutters, but this method requires a gutter index to be passed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"overwritable" means "can be overridden", so I'm not sure this suggestion is right. Also I am trying to describe the scenario when it may be overridden. When true it is always "overwritable".
I'll change "the gutter lines" to "lines of the gutter at the given index".
Edit: actually it's more accurate to say "line data of the gutter at the given index can be overridden..."
Its stuff like the icon, color, and metadata that are stored per line that get overridden.
53c9037
to
fb3eb53
Compare
Rebased and applied suggestions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get ready for a huge second pass revision by yours truly just to ensure we don't have to do this again for a loooong while.
I am really happy about this and I must congratulate you for the hard work.
fb3eb53
to
d467b3a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No beating around the bush. All of this is a huge improvement.
Thanks! |
get_visible_line_count
andget_total_visible_line_count
in particular seemed to be swapped.Sets whether
andSets if
.[member ProjectSettings.input/...]
for actions (and foundui_text_unindent
is actually supposed to beui_text_dedent
).