-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
TextEdit cleanup and refactoring #50371
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bruvzg
reviewed
Jul 12, 2021
bitsawer
reviewed
Jul 12, 2021
Paulb23
force-pushed
the
text_edit_cleanup
branch
from
July 12, 2021 21:28
aef07cf
to
487c332
Compare
Paulb23
force-pushed
the
text_edit_cleanup
branch
2 times, most recently
from
August 6, 2021 13:03
8a72573
to
92bb862
Compare
KoBeWi
reviewed
Aug 9, 2021
KoBeWi
reviewed
Aug 9, 2021
KoBeWi
reviewed
Aug 9, 2021
KoBeWi
reviewed
Aug 9, 2021
KoBeWi
reviewed
Aug 9, 2021
KoBeWi
reviewed
Aug 9, 2021
KoBeWi
reviewed
Aug 9, 2021
KoBeWi
reviewed
Aug 9, 2021
KoBeWi
reviewed
Aug 9, 2021
KoBeWi
reviewed
Aug 9, 2021
KoBeWi
reviewed
Aug 9, 2021
KoBeWi
reviewed
Aug 9, 2021
KoBeWi
reviewed
Aug 11, 2021
KoBeWi
reviewed
Aug 11, 2021
Paulb23
force-pushed
the
text_edit_cleanup
branch
from
August 11, 2021 17:19
da2b063
to
1b482d9
Compare
KoBeWi
approved these changes
Aug 11, 2021
Paulb23
force-pushed
the
text_edit_cleanup
branch
from
August 12, 2021 12:24
1b482d9
to
a4606c2
Compare
akien-mga
approved these changes
Aug 12, 2021
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Continuation of #31739
Builds on #50122
This PR seems larger then it is, mainly moving around code and renames, rather then any changes.
The main aim of this PR is to cleanup after extracting features into
CodeEdit
and to prepare the API going forward. Will doEditorSettings
as a separate PR.Given
TextEdit
has organically grown rather large it became a bit of mess, so I took the time here to reorganise the methods; hopefully will made it easier to browse.With that said, the three main API changes are:
enum CaretType
, currently withLine
andBlock
as the options. The methods have been renamed appropriately:cursor_set_block_mode
-->set_caret_type
cursor_is_block_mode
-->get_caret_type
enum LineWrappingMode
, withNone
andBoundary
meaning the control boundary as it currently works. Similarly the methods have been renamed:set_wrap_enabled
-->set_line_wrapping_mode
is_wrap_enabled
-->get_line_wrapping_mode
_cut
_copy
_paste
Otherwise bedsides exposing many new methods, the following renames have taken place:
Caret:
cursor_get_blink_enabled
-->set_caret_blink_enabled
cursor_set_blink_enabled
-->is_caret_blink_enabled
cursor_set_blink_speed
-->set_caret_blink_speed
cursor_get_blink_speed
-->get_caret_blink_speed
set_right_click_moves_caret
-->set_move_caret_on_right_click_enabled
is_right_click_moving_caret
-->is_move_caret_on_right_click_enabled
set_mid_grapheme_caret_enabled
-->set_caret_mid_grapheme_enabled
get_mid_grapheme_caret_enabled
-->is_caret_mid_grapheme_enabled
cursor_set_line
-->set_caret_line
cursor_get_line
-->get_caret_line
cursor_set_column
-->set_caret_column
cursor_get_column
-->get_caret_column
adjust_viewport_to_cursor
-->adjust_viewport_to_caret
insert_text_at_cursor
-->insert_text_at_caret
get_word_under_cursor
-->get_word_under_caret
Selection:
is_selection_active
-->has_selection
get_selection_text
-->get_selected_text
Insert Mode:
set_insert_mode
-->set_overtype_mode_enabled
is_insert_mode
-->is_overtype_mode_enabled
Read only:
set_readonly
-->set_editable
is_readonly
-->is_editable
Signals:
cursor_changed
-->caret_changed
Properties:
caret_block_mode
-->caret_type
caret_enabled
-->wrap_mode
caret_moving_by_right_click
-->caret_move_on_right_click
Supersedes #47548
Apart from the couple features that need a little more work, after this I'm happy to close #31739