summaryrefslogtreecommitdiffstats
path: root/editor/code_editor.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Translate "No match" message in FindReplaceBarHaoyu Qiu2023-07-021-1/+1
|
* [TextEdit] Expose all auto-wrap modes.bruvzg2023-06-131-0/+1
|
* Merge pull request #75746 from ajreckof/order_autocompleteRémi Verschelde2023-06-081-1/+1
|\ | | | | Sort code autocompletion with rules
| * sort code completions with rulesajreckof2023-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixups Add levenshtein distance for comparisons, remove kind sort order, try to improve as many different use cases as possible Trying again to improve code completion Sort code autocompletion options by similarity based on input To make it really brief, uses a combination `String.similiary`, the category system introduced in a previous PR, and some filtering to yield more predictable results, instead of scattering every completion option at seemingly random. It also gives much higher priority to strings that contain the base in full, closer to the beginning or are perfect matches. Also moves CodeCompletionOptionCompare to code_edit.cpp Co-Authored-By: Micky <66727710+Mickeon@users.noreply.github.com> Co-Authored-By: Eric M <41730826+EricEzaM@users.noreply.github.com>
* | Enable bookmarks gutterkobewi2023-06-021-0/+1
| |
* | Merge pull request #66763 from MewPurPur/remove-bookmark-hidingRémi Verschelde2023-05-291-1/+0
|\ \ | | | | | | | | | Remove editor setting for hiding bookmarks
| * | Remove editor setting for hiding bookmarksVolTer2022-11-021-1/+0
| | |
* | | Use defined key mapping for closing popups and dialogsArman Elgudzhyan2023-05-201-16/+4
| |/ |/| | | | | As opposed to hardcoding the escape key. Also removed such hardcoding in a few other places as well as a hardcoded enter key in one of the affected input fields.
* | Move convert_indent into CodeEditPaulb232023-05-071-105/+3
| |
* | Merge pull request #72288 from MewPurPur/use-string-repeatClay John2023-05-051-5/+1
|\ \ | | | | | | Use `String.repeat()` to optimize several String methods
| * | Use String.repeat() in more placesVolTer2023-05-011-5/+1
| | |
* | | Fix `line_spacing` in code editor will not take effect immediately on changeRindbee2023-04-241-0/+1
| | | | | | | | | | | | | | | Previously, in CodeTextEditor, `line_spacing` was forgotten to update when the editor setting property changed.
* | | Code style improvements to text_edit and relatedVolTer2023-04-081-27/+28
| | |
* | | Merge pull request #75070 from jmb462/74802Yuri Sizov2023-04-031-1/+7
|\ \ \ | | | | | | | | Fix commenting collapsed function issue
| * | | Fix commenting collapsed function issueJean-Michel Bernard2023-03-251-1/+7
| | | |
* | | | Fix off-by-one issue where Go to Line dialog shows the incorrect lineRon B. Yeh2023-03-301-8/+11
|/ / / | | | | | | | | | number (one less than the actual current line).
* | | Fix toggle comment not moving caretaXu-AP2023-02-161-2/+3
| | | | | | | | | | | | Fix regression if caret is at the beginning of the line and comment is toggled.
* | | Rework code editor multiline operationsaXu-AP2023-02-121-154/+135
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Remove some unused signalsRémi Verschelde2023-01-311-1/+0
| | | | | | | | | | | | Part of #37604.
* | | Fixed removing secondary carets when editing with search openPaulb232023-01-281-1/+3
|/ /
* | Implement BiDi override mode for GDScript source.bruvzg2023-01-181-0/+1
| |
* | Remove secondary carets when using FindReplaceBarPaulb232023-01-141-0/+3
| |
* | One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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".
* | Cancels the code complete timer when the caret moves to another lineAlfred Reinold Baudisch2022-12-061-0/+5
| | | | | | | | Fixes and closes #68961
* | Merge pull request #69132 from RumblingTurtle/multiline-move-fixRémi Verschelde2022-12-051-126/+137
|\ \ | | | | | | | | | Script editor: Rewrite multiline move logic
| * | Script editor: Rewrite multiline move logic. Preserving all carets and their ↵Eduard Zalyaev2022-12-051-126/+137
| | | | | | | | | | | | | | | | | | selections intact on alt+up/down shortcut Fixes #68731.
* | | Merge pull request #68759 from MewPurPur/bookmark-fixRémi Verschelde2022-11-281-30/+12
|\ \ \ | | | | | | | | | | | | Fix text selection persisting on bookmark traversal
| * | | Fix text selection persisting on bookmark traversalVolTer2022-11-171-30/+12
| | | |
* | | | Rename TextureButton set_*_texture methods to set_texture_*Aaron Franke2022-11-191-4/+4
| |/ / |/| |
* | | Fix "Search" match inconsistenciesChristian Cuevas2022-11-161-3/+5
|/ / | | | | | | | | - 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.
* / Disable code font ligatures by default in the editorHugo Locurcio2022-11-121-2/+2
|/
* Unify usage of GLOBAL/EDITOR_GETkobewi2022-10-181-35/+35
|
* Fix some bugs about search in code editorRindbee2022-10-111-44/+53
| | | | | | 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.
* Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg2022-10-071-9/+9
| | | | change warnings=all to use /W4.
* Merge pull request #61902 from Paulb23/multi-caretRémi Verschelde2022-10-061-239/+429
|\ | | | | | | Add Multi-caret support to TextEdit
| * Add multi caret support to EditorPaulb232022-10-051-240/+430
| |
* | Split script navigation state and edit statekobewi2022-09-251-14/+23
|/
* Fix key mapping changes when moving from macOS to other platformbruvzg2022-09-071-4/+4
| | | | | Removes separate `Command` key (use `Meta` instead). Adds an event flag to automatically remap `Command` <-> `Control` (cannot be set alongside `Control` or `Meta`).
* Rename every instance of `caret_blink_speed` to `caret_blink_interval`Micky2022-09-061-1/+1
| | | | | | It's been changed in EditorSettings, LineEdit, TextEdit. Affects setters and getters, and passed parameters, too.
* Rename `CanvasItem.update()` to `queue_redraw()`Micky2022-08-291-8/+8
| | | | | | | | | | 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`.
* Revert "Remove NOTIFICATION_ENTER_TREE when paired with ↵Rémi Verschelde2022-08-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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()`).
* Merge pull request #64885 from Mickeon/rename-tooltip-hintRémi Verschelde2022-08-281-4/+4
|\ | | | | Rename `hint_tooltip` to `tooltip_text` & setter getter
| * Rename `hint_tooltip` to `tooltip_text` & setgetMicky2022-08-271-4/+4
| | | | | | | | | | | | | | | | `hint_tooltip` -> `tooltip_text` `set_tooltip` -> `set_tooltip_text` `_get_tooltip` -> `get_tooltip_text` Updates documentation, too.
* | Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGEDAaron Record2022-08-271-4/+0
|/
* Replace Array return types with TypedArraykobewi2022-08-221-2/+2
|
* Allow using numpad for zoom shortcuts in the 2D/code editorsHugo Locurcio2022-08-101-1/+2
| | | | This behavior is consistent with GIMP.
* Fix guidelines appearanceStanislav Labzyuk2022-08-021-0/+2
|
* Fix script editor zoom shortcuts not marking events as accepted.bruvzg2022-07-251-0/+3
|
* Adding shader preprocessor supportYuri Roubinsky2022-07-221-0/+4
| | | | Co-authored-by: TheOrangeDay <6472143+TheOrangeDay@users.noreply.github.com>
* Fix negative search result matchAndreas Raddau2022-07-121-1/+1
|