summaryrefslogtreecommitdiff
path: root/scene/gui/text_edit.cpp
AgeCommit message (Collapse)Author
2022-11-23Fix error while selecting last empty lineAdam Scott
2022-11-06Mouse click deselect removes secondary carets and puts primary caret under ↵Alfred Reinold Baudisch
mouse position Fixes and closes #67993.
2022-11-02Style: Misc docs and comment style and language fixesRémi Verschelde
- Removed empty paragraphs in XML. - Consistently use bold style for "Example:", on a new line. - Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`). - Fix invalid usage of backticks for inline code in BBCode. - Fix some American/British English spelling inconsistencies. - Other minor fixes spotted along the way, including typo fixes with codespell. - Don't specify `@GlobalScope` for `enum` and `constant`.
2022-11-02Unified shortcut to clear carets and selectionsAlfred Reinold Baudisch
Refactors`ui_text_remove_secondary_carets` from https://github.com/godotengine/godot/pull/68089 as `ui_text_clear_carets_and_selection`, with extra behaviour: - If there's only one active caret active with a selection, clears the selection. - In case there's more than one caret active, removes the secondary carets and clears selections. With this change, `TextEdit` then imitates the behaviour of VSCode for clearing carets and selections.
2022-10-31Shortcut and Bind to Remove Secondary CaretsAlfred Reinold Baudisch
Adds the bind `ui_text_remove_secondary_carets` to TextEdit, with ESC as the default shortcut. When the bind is performed, if the TextEdit has multiple carets, `remove_secondary_carets` is called and secondary carets are removed. This is useful when multiple selects are performed with `add_select_for_next_occurrence` #67644 or when multiple multiple carets are manually added, then it's possible to go back to a single caret with a shortcut. Closes #67991
2022-10-31Merge pull request #67888 from KoBeWi/overrideadRémi Verschelde
Remove `override_selected_font_color` property
2022-10-31Merge pull request #67496 from Paulb23/text-edit-crashesRémi Verschelde
Fix TextEdit action and CodeEdit completion crash
2022-10-31Merge pull request #67139 from PucklaMotzer09/insert_caret_at_caretsRémi Verschelde
Add Caret Insert Below and Above shortcuts to TextEdit
2022-10-27Merge pull request #67644 from alfredbaudisch/add-selection-next-occurrenceClay John
Add Selection and Caret for Next Occurrence of Selection
2022-10-26Remove override_selected_font_color propertykobewi
2022-10-21Add Selection and Caret for Next Occurrence of SelectionAlfred Reinold Baudisch
Adds the bind `add_selection_for_next_occurrence` to TextEdit, with CTRL+D as the default shortcut. When the bind is performed, ff a selection is currently active with the last caret in text fields, searches for the next occurrence of the selection, adds a caret and selects the next occurrence. If no selection is currently active with the last caret in text fields, selects the word currently under the caret. The action can be performed sequentially for all occurrences of the selection of the last caret and for all existing carets. The viewport is adjusted to the latest newly added caret. The bind and the behaviour is similar to VS Code's "Add Selection to Next Find Match" and JetBrains' "Add Selection for Next Occurrence". It takes advantage of the multi-caret API. The default shortcut for `select_word_under_caret` has been changed to ALT+G, in order to give priority to CTRL+D for `add_selection_for_next_occurrence` to better align with popular IDEs and editors.
2022-10-18Code simplificationsMarkus Sauermann
1. Viewport::get_visible_rect().position is always zero. So Control::get_window_rect is identical to Control::get_global_rect. Remove Control::get_window_rect since it is not used in the source code. 2. sqrt(a * a) = abs(a) for doubles 3. Simplify affine_inverse combination 4. Simplify calculation in shaders
2022-10-18Add Caret Insert Below and Above shortcuts to TextEditPucklaMotzer09
2022-10-16Fix undo redo not adjusting TextEdit viewport to caretPaulb23
2022-10-16Forcibly end current TextEdit action on undo redoPaulb23
2022-10-11Fix select word under caret using caret col instead of linePaulb23
2022-10-10Merge pull request #67145 from Paulb23/tab_texteditRémi Verschelde
Fix inserting tabs in TextEdit
2022-10-10Merge pull request #65805 from MewPurPur/improve-breakpoint-hoveringRémi Verschelde
Improve bookmark and breakpoint indicators
2022-10-10Improved breakpoints hover indicatorVolTer
2022-10-10Don't allow removing TextEdit's main caretHaoyu Qiu
2022-10-09Handle tab in TextEditPaulb23
2022-10-07Getters for TextEdit scrollbarsmicroaeris
2022-10-07Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg
change warnings=all to use /W4.
2022-10-07Add split caret direction markers. Fix block/overtype caret size.bruvzg
2022-10-05Add mutliple Caret support to TextEditPaulb23
2022-10-03Move selecion into caretPaulb23
2022-09-23[TextEdit] Use error/selection font color for the current glyph only, ↵bruvzg
instead of updating cached font color.
2022-09-07Fix key mapping changes when moving from macOS to other platformbruvzg
Removes separate `Command` key (use `Meta` instead). Adds an event flag to automatically remap `Command` <-> `Control` (cannot be set alongside `Control` or `Meta`).
2022-09-06Rename every instance of `caret_blink_speed` to `caret_blink_interval`Micky
It's been changed in EditorSettings, LineEdit, TextEdit. Affects setters and getters, and passed parameters, too.
2022-09-02Merge pull request #64917 from Tim-Fronsee/fix/add-gutter-total-widthRémi Verschelde
2022-08-31Fix TextEdit::gutters_width (total gutter width) when adding & removing a ↵Tim Fronsee
gutter by calling TextEdit::_update_gutter_width in TextEdit::add_gutter & TextEdit::remove_gutter Update TextEdit gutters subcase, gutter add and remove to ensure gutter total width is correct Fix test_code_edit symbol lookup test case to include padding (+2)
2022-08-29Rename `CanvasItem.update()` to `queue_redraw()`Micky
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on. Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency. Just a few comments have also been changed to say "redraw". In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
2022-08-23Add some codes, returnes directly if the value is not changed.风青山
Avoid executing the following value-changed logics if the value does not really change.
2022-08-08Add tests for empty/unnamed arguments to ClassDB, Variant, GDScriptYuri Sizov
2022-08-04Add support for multiple virtual keyboard typesBrian Semrau
2022-07-29Remove Signal connect bindsJuan Linietsky
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind(). Changed all uses of it to Callable.bind()
2022-07-26Implement support for loading system fonts on Linux, macOS / iOS and Windows.bruvzg
2022-07-10Fix too thin underline in brace matchkobewi
2022-07-06Refactor Font configuration and import UI, and Font resources.bruvzg
2022-07-04Allow to disable TextEdit vertical scrollkobewi
2022-06-26Add an option to drag'n'drop selected text in TextEditConteZero
2022-06-11Add suffixes to all nodes and resourcesFireForge
2022-06-02Remove redundant min call when setting lineiwek
2022-05-23Fix typos with codespellRémi Verschelde
Using codespell 2.2-dev from current git.
2022-05-18Merge pull request #60955 from ↵Rémi Verschelde
pfertyk/issue-60668-fix-get-breakpointed-lines-crash Fix `get_breakpointed_lines` crashing Godot
2022-05-16Fix get_breakpointed_lines crashing GodotPaweł Fertyk
Fixes #60668.
2022-05-13Add ALT NUM+ {hex code} character input support for LineEdit, TextEdit and ↵bruvzg
CodeEdit.
2022-05-09Fix backspace when selection reaches left edgePaweł Fertyk
Fixes #60866.
2022-04-25Merge pull request #60438 from Paulb23/text-edit-testsRémi Verschelde
Add TextEdit unit tests and multiple fixes.
2022-04-22Multiple small TextEdit Bug FixesPaulb23
Fixed line_drawing_cache not containing anything Fixed is_move_caret_on_right_click_enabled requiring the context menu to be enabled Fixed when selecting_enabled is false not disabling shift + click Fixed when selecting_enabled is false not being able to drag the caret Fixed _delete emitting signals when nothing had changed. Fixed insert_line_at up causing a visual update Fixed get_pos_at_line_column returning a valid position when it was invalid Fixed set_caret_column unnecessary emitting "caret_changed" when the column is greater then the line Fixed select_word_under_caret not accepting the edges of words Fixed select_word_under_caret moving the caret to the start of the line when no word was found Fixed get_selection_line and get_selection_column not checking if the selection was enabled Fixed set_line_as_center_visible throwing errors if it would show line 0 Fixed set_line_as_center_visible being off by one Fixed set_line_as_last_visible not being able to show the first line Fixed pressing UP and the end of a wrapped line sending the caret to col 0 rather then then persevering the position.