summaryrefslogtreecommitdiff
path: root/editor/code_editor.cpp
AgeCommit message (Collapse)Author
2023-04-07Fix commenting collapsed function issueJean-Michel Bernard
(cherry picked from commit 68ad3338ef321772903896a3a99878f0b3bd6bf3)
2023-04-07Fix off-by-one issue where Go to Line dialog shows the incorrect lineRon B. Yeh
number (one less than the actual current line). (cherry picked from commit 1e9fd10f68e462a7fc6aac84e7659d0fcb0dc0e3)
2023-02-16Fix toggle comment not moving caretaXu-AP
Fix regression if caret is at the beginning of the line and comment is toggled.
2023-02-12Rework code editor multiline operationsaXu-AP
Fix bugs if 2 selections were on same line. Fix bugs when selection ended at new line. Make carets stay in place after operation and on undo. Affects: delete lines, move lines, toggle comments, bookmarks and breakpoints.
2023-01-31Remove some unused signalsRémi Verschelde
Part of #37604.
2023-01-28Fixed removing secondary carets when editing with search openPaulb23
2023-01-18Implement BiDi override mode for GDScript source.bruvzg
2023-01-14Remove secondary carets when using FindReplaceBarPaulb23
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-06Cancels the code complete timer when the caret moves to another lineAlfred Reinold Baudisch
Fixes and closes #68961
2022-12-05Merge pull request #69132 from RumblingTurtle/multiline-move-fixRémi Verschelde
Script editor: Rewrite multiline move logic
2022-12-05Script editor: Rewrite multiline move logic. Preserving all carets and their ↵Eduard Zalyaev
selections intact on alt+up/down shortcut Fixes #68731.
2022-11-28Merge pull request #68759 from MewPurPur/bookmark-fixRémi Verschelde
Fix text selection persisting on bookmark traversal
2022-11-19Rename TextureButton set_*_texture methods to set_texture_*Aaron Franke
2022-11-17Fix text selection persisting on bookmark traversalVolTer
2022-11-16Fix "Search" match inconsistenciesChristian Cuevas
- Offset by searched length not line text - Continue searching line for whole word matches on mismatch: Breaking at this point makes it so that upon any whole word mismatch all potential matches after this point inline are skipped, to avoid this unwanted behavior we continue searching the line positioned after the mismatch.
2022-11-12Disable code font ligatures by default in the editorHugo Locurcio
2022-10-18Unify usage of GLOBAL/EDITOR_GETkobewi
2022-10-11Fix some bugs about search in code editorRindbee
1. Fix #61713; 2. Fix the bug when there are consecutive matches, forward searching will skip the adjacent item; 3. Fix the bug that enable the selection-only option will affect the operations in search mode.
2022-10-07Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg
change warnings=all to use /W4.
2022-10-06Merge pull request #61902 from Paulb23/multi-caretRémi Verschelde
Add Multi-caret support to TextEdit
2022-10-05Add multi caret support to EditorPaulb23
2022-09-25Split script navigation state and edit statekobewi
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-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-29Revert "Remove NOTIFICATION_ENTER_TREE when paired with ↵Rémi Verschelde
NOTIFICATION_THEME_CHANGED" This reverts commit 4b817a565cab8af648c88cfc7ab6481e86ee3625. Fixes #64988. Fixes #64997. This caused several regressions (#64988, #64997, https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605) which point at a flaw in the current logic: - `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with `NOTIFCATION_THEME_CHANGED` as introduced in #62845. - Some classes use their `THEME_CHANGED` to cache theme items in member variables (e.g. `style_normal`, etc.), and use those member variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE` notification is now deferred, they end up accessing invalid state and this can lead to not applying theme properly (e.g. for EditorHelp) or crashing (e.g. for EditorLog or CodeEdit). So we need to go back to the drawing board and see if `THEME_CHANGED` can be called earlier so that the previous logic still works? Or can we refactor all engine code to make sure that: - `ENTER_TREE` and similar do not depend on theme properties cached in member variables. - Or `THEME_CHANGE` does trigger a general UI update to make sure that any bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE` does arrive for the first time. But that means having a temporary invalid (and possibly still crashing) state, and doing some computations twice which might be heavy (e.g. `EditorHelp::_update_doc()`).
2022-08-28Merge pull request #64885 from Mickeon/rename-tooltip-hintRémi Verschelde
Rename `hint_tooltip` to `tooltip_text` & setter getter
2022-08-27Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGEDAaron Record
2022-08-27Rename `hint_tooltip` to `tooltip_text` & setgetMicky
`hint_tooltip` -> `tooltip_text` `set_tooltip` -> `set_tooltip_text` `_get_tooltip` -> `get_tooltip_text` Updates documentation, too.
2022-08-22Replace Array return types with TypedArraykobewi
2022-08-10Allow using numpad for zoom shortcuts in the 2D/code editorsHugo Locurcio
This behavior is consistent with GIMP.
2022-08-02Fix guidelines appearanceStanislav Labzyuk
2022-07-25Fix script editor zoom shortcuts not marking events as accepted.bruvzg
2022-07-22Adding shader preprocessor supportYuri Roubinsky
Co-authored-by: TheOrangeDay <6472143+TheOrangeDay@users.noreply.github.com>
2022-07-12Fix negative search result matchAndreas Raddau
2022-07-08Fix regressions from Font refactorbruvzg
Remove unnecessary font override Fixes button outline draw when it should not, causing button colors to be slightly off
2022-07-07Fix regressions from Font refactorbruvzg
Fixes `p_font.is_null()` errors due to incorrect resource type used. Fixes code editor font not set correctly, and OpenType features applied to the wrong font.
2022-07-06Refactor Font configuration and import UI, and Font resources.bruvzg
2022-06-26Add an option to drag'n'drop selected text in TextEditConteZero
2022-05-02Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde
Didn't commit all the changes where it wants to initialize a struct with `{}`. Should be reviewed in a separate PR. Option `IgnoreArrays` enabled for now to be conservative, can be disabled to see if it proposes more useful changes. Also fixed manually a handful of other missing initializations / moved some from constructors.
2022-04-27Indicate code editor search match numberOğuzhan Eroğlu
2022-03-27Add GDExtension support to Scriptreduz
* Ability to create script languages from GDExtension * Some additions to gdnative_extension.h to make this happen * Moved the GDExtension binder to core This now allows creating scripting languages from GDExtension, with the same ease as if it was a module. It replaces the old PluginScript from Godot 3.x. Warning: GodotCPP will need to be updated to support this (it may be a bit of work as ScriptInstance needs to be created over there again).
2022-03-12Initialize bools in the headers in editorAaron Franke
2022-02-16Port existing _notification code to use switch statements (part 1/3)jmb462
2022-02-15Editor: Cleanup some includes dependenciesRémi Verschelde
Removes some unnecessary includes from `editor_node.h`, and instead add those where they're used. Removes unnecessary `editor_node.h` includes in various editor classes. Renames `dynamicfont` to `dynamic_font` in a couple files. Misc cleanup while jumping through that rabbit hole.
2022-02-12Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker
2022-02-08Revert "Add missing SNAME macro optimization to all theme methods call"Rémi Verschelde
This reverts commit a988fad9a092053434545c32afae91ccbdfbe792. As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used everywhere but only in critical code paths. For theme methods specifically, it was by design that only getters use `SNAME` and not setters.
2022-02-06Add missing SNAME macro optimization to all theme methods calljmb462
2022-02-06Add missing SNAME macro optimization in some function callsjmb462