summaryrefslogtreecommitdiff
path: root/scene/gui/text_edit.cpp
AgeCommit message (Collapse)Author
2023-04-03[TextEdit] Fix block caret size at the end of the line.bruvzg
(cherry picked from commit efe04af446cd042c6505722ef2608aa03dc63435)
2023-03-27Fix get_drag_data not overridable in some Controlskobewi
(cherry picked from commit 36141dc469baaf027e753718598b32c15fe7c541)
2023-03-27Fix IME position in the single window mode sub-windows.bruvzg
(cherry picked from commit 3ca3ee36abb2eb9e97b6b8de0ebc99abceda54c2)
2023-03-13[TextEdit] Do not draw virtual spaces (word break / justification points).bruvzg
(cherry picked from commit 25bc62ad13372490e7ba2c889174ceca34d1f33f)
2023-02-27[TextEdit / IME] Check selection before deleting to avoid unnecessary error ↵bruvzg
messages.
2023-02-19Fix ctrl+backspace crash with multicarets on the same linePaulb23
2023-02-16Fix error spam when hovering minimap in the script editorJames Mintram
2023-01-27Fix `LineEdit` and `TextEdit` context menus not customizableDanil Alexeev
2023-01-26[Windows] Fix committing IME text without IME deactivation.bruvzg
2023-01-24PropertyUsage: Rename "DO_NOT_SHARE_ON_DUPLICATE" to "ALWAYS_DUPLICATE"Aaron Franke
2023-01-23Cleanup and unify keyboard input.bruvzg
- Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes. - Unify IME behaviour, add inline composition string display on Windows and X11. - Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events. - Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS. - Add support for media key handling on macOS. Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-01-18Implement BiDi override mode for GDScript source.bruvzg
2023-01-08Use BitField<> in core type masksJuan Linietsky
* All core types masks are now correctly marked as bitfields. * The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks. * Most bitmask operations replaced by functions in BitField<> * Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is. * Documentation and API dump updated to reflect bitfields in core types.
2023-01-06Merge pull request #68429 from KoBeWi/PropertySettingsRémi Verschelde
Add PropertyInfo overload for GLOBAL_DEF
2023-01-05One Copyright Update to rule them allRémi Verschelde
As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
2022-12-13[TextEdit] Fix IME intermediate text not displayed when TextEdit is empty ↵bruvzg
and placeholder is set.
2022-12-11Add PropertyInfo overload for GLOBAL_DEFkobewi
2022-12-06Fix highlight overlaps in TextEditDanil Alexeev
2022-12-03Script editor: Fix edge case when double-click incorrectly updates caret ↵Eduard Zalyaev
position Fixes #68898.
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)