Skip to content

Commit e19b808

Browse files
committed
Merge pull request godotengine#86978 from kitbdev/multicaret-overhaul
Overhaul multicaret editing and selection in TextEdit
2 parents d9bf750 + 773a473 commit e19b808

File tree

19 files changed

+8340
-3294
lines changed

19 files changed

+8340
-3294
lines changed

doc/classes/CodeEdit.xml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<return type="void" />
1515
<param index="0" name="replace" type="bool" />
1616
<description>
17-
Override this method to define how the selected entry should be inserted. If [param replace] is true, any existing text should be replaced.
17+
Override this method to define how the selected entry should be inserted. If [param replace] is [code]true[/code], any existing text should be replaced.
1818
</description>
1919
</method>
2020
<method name="_filter_code_completion_candidates" qualifiers="virtual const">
@@ -29,7 +29,7 @@
2929
<return type="void" />
3030
<param index="0" name="force" type="bool" />
3131
<description>
32-
Override this method to define what happens when the user requests code completion. If [param force] is true, any checks should be bypassed.
32+
Override this method to define what happens when the user requests code completion. If [param force] is [code]true[/code], any checks should be bypassed.
3333
</description>
3434
</method>
3535
<method name="add_auto_brace_completion_pair">
@@ -123,7 +123,7 @@
123123
<return type="void" />
124124
<param index="0" name="replace" type="bool" default="false" />
125125
<description>
126-
Inserts the selected entry into the text. If [param replace] is true, any existing text is replaced rather than merged.
126+
Inserts the selected entry into the text. If [param replace] is [code]true[/code], any existing text is replaced rather than merged.
127127
</description>
128128
</method>
129129
<method name="convert_indent">
@@ -144,6 +144,12 @@
144144
Code regions are delimited using start and end tags (respectively [code]region[/code] and [code]endregion[/code] by default) preceded by one line comment delimiter. (eg. [code]#region[/code] and [code]#endregion[/code])
145145
</description>
146146
</method>
147+
<method name="delete_lines">
148+
<return type="void" />
149+
<description>
150+
Deletes all lines that are selected or have a caret on them.
151+
</description>
152+
</method>
147153
<method name="do_indent">
148154
<return type="void" />
149155
<description>
@@ -156,6 +162,12 @@
156162
Duplicates all lines currently selected with any caret. Duplicates the entire line beneath the current one no matter where the caret is within the line.
157163
</description>
158164
</method>
165+
<method name="duplicate_selection">
166+
<return type="void" />
167+
<description>
168+
Duplicates all selected text and duplicates all lines with a caret on them.
169+
</description>
170+
</method>
159171
<method name="fold_all_lines">
160172
<return type="void" />
161173
<description>
@@ -379,6 +391,18 @@
379391
Returns whether the line at the specified index is folded or not.
380392
</description>
381393
</method>
394+
<method name="move_lines_down">
395+
<return type="void" />
396+
<description>
397+
Moves all lines down that are selected or have a caret on them.
398+
</description>
399+
</method>
400+
<method name="move_lines_up">
401+
<return type="void" />
402+
<description>
403+
Moves all lines up that are selected or have a caret on them.
404+
</description>
405+
</method>
382406
<method name="remove_comment_delimiter">
383407
<return type="void" />
384408
<param index="0" name="start_key" type="String" />
@@ -397,7 +421,7 @@
397421
<return type="void" />
398422
<param index="0" name="force" type="bool" default="false" />
399423
<description>
400-
Emits [signal code_completion_requested], if [param force] is true will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path or signal.
424+
Emits [signal code_completion_requested], if [param force] is [code]true[/code] will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path, or signal.
401425
</description>
402426
</method>
403427
<method name="set_code_completion_selected_index">
@@ -467,6 +491,12 @@
467491
Toggle the folding of the code block at the given line.
468492
</description>
469493
</method>
494+
<method name="toggle_foldable_lines_at_carets">
495+
<return type="void" />
496+
<description>
497+
Toggle the folding of the code block on all lines with a caret on them.
498+
</description>
499+
</method>
470500
<method name="unfold_all_lines">
471501
<return type="void" />
472502
<description>

doc/classes/TextEdit.xml

Lines changed: 170 additions & 28 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)