Commit graph

339 commits

Author SHA1 Message Date
Rémi Verschelde 040254ef7c Fix potential divisions by 0 reported by MSVC
The `TextEdit` one was indeed a potential bug.
The `PCKPacker` one seems to be a false positive, it's already in a
`for` loop that depends on `files.size()`.

(cherry picked from commit ca4e4506db)
2020-03-25 10:27:48 +01:00
allkhor b680939036 TextEdit: remove selection when clear happens.
(cherry picked from commit 594e0261f3)
2019-07-03 15:17:13 +02:00
Thomas ten Cate 2e34a922f0 Reset caret blink when Ctrl+moving the cursor
There was a hardcoded exception to never reset caret blinking if Ctrl
(`command`) was pressed. This broke on Ctrl+arrows,
Ctrl+Home/End/PgUp/PgDn, Ctrl+C, Ctrl+V, Ctrl+Backspace and Ctrl+Delete.

Resetting blink only for those Ctrl operations that actually touch the
cursor somehow would clutter the code a lot, so I removed the check
entirely. That means we now also reset blinking on unrelated operations
like Ctrl+O, but that seems pretty harmless. I actually like the
additional bit of feedback even in that case (most of these will
immediately defocus the editor anyway, so you never see it).

Fixes #18100

(cherry picked from commit 44d761e55c)
2019-07-03 13:35:41 +02:00
Rémi Verschelde 0eab0d9343 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-03 11:41:35 +01:00
Hugo Locurcio 403f7dc35f Change ".." punctuation for "..." in editor strings (#16507)
(cherry picked from commit 1c419531a0)
2018-06-05 21:42:33 +02:00
toger5 b04c9a1b66 fixed capital A osx
(cherry picked from commit 6476b708d9)
2018-06-01 17:43:28 +02:00
toger5 dd026c77e3 fixed a input not registered in osx script editor
(cherry picked from commit d927e972d1)
2018-06-01 17:43:14 +02:00
Sherjil Ozair 00bf66d7f2 Add additional macos shortcuts for going to start/end of line
(cherry picked from commit 166c7fdc9d)
2018-06-01 17:43:10 +02:00
Hugo Locurcio 8ccb27ce18 Tweak the property hint ranges of caret blink and line length guideline
This allows for more precise adjustments.

(cherry picked from commit 0eb2f6c223)
2018-05-13 22:36:21 +02:00
Charly Mourglia 10c12b37ec Consider TextEdit paste operation complex.
Not considering a paste operation as a complex one ends up
adding an unneeded extra step when pasting over a selection.

This fixes issue #18325

(cherry picked from commit b09e0454bb)
2018-05-13 22:16:56 +02:00
sersoong b5425e3d87 Fixed context menu TTR bugs
(cherry picked from commit a1cfc89108)
2018-04-28 22:57:32 +02:00
robfram bffd4f0548 Fix bad autocomplete of partially written node paths when using syntactic sugar notation ($)
If you had a tree like Node2D->Sprite->Camera2D and you write a
code like $Node2D/Spr and chose the autocompletion sugested
Node2D/Sprite, the resulting string was $Node2D/Node2D/Sprite
instead $Node2D/Sprite. If you chose Node2D/Sprite/Camera2D, then
you ended with $Node2D/Node2D/Sprite/Camera2D.

Fix #15813.

(cherry picked from commit 95f186b621)
2018-04-14 23:14:30 +02:00
Alexander Holland 259b9664ef auto-completion edge jump
arrow up/down jumps to end/start on edges

(cherry picked from commit e36dd4282b)
2018-04-14 21:29:48 +02:00
Rado'sPC\aRaGaR 3d804778fd Fix quotation in string
fix for #16404

(cherry picked from commit f38e819fc1)
2018-02-22 13:23:44 +01:00
luz.paz 751806b5c7 Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```

(cherry picked from commit 612ab4bbc6)
2018-02-22 12:17:06 +01:00
Ian 723613dbc3 TextEdit folding over unindented comments
(cherry picked from commit d327f75392)
2018-02-21 23:51:45 +01:00
binbitten 0fa4325153 Fix TextEdit current line highlight horizontal offset
(cherry picked from commit ba8c5bff69)
2018-02-04 20:06:46 +01:00
Rémi Verschelde 9f479f096c Fix typos in code and docs with codespell
Using v1.11.0 from https://github.com/lucasdemarchi/codespell
2018-01-18 22:01:42 +01:00
Ian 1b837125ce TextEdit fix get_mouse after many folds 2018-01-18 12:18:06 -05:00
Paulb23 386c57cfad Fixed current line highligting with horizontal clipping, issue 15427 2018-01-14 16:06:27 +00:00
Paul Joannon 8ae0624c80 Deselect on undo/redo in TextEdit 2018-01-13 11:46:53 +01:00
Juan Linietsky 419705db6e Add special coloring to members, to make shadowing more obvious. 2018-01-12 11:01:09 -03:00
Bojidar Marinov 9b8e8b2220
Bind many more properties to scripts
Notable potentially breaking changes:
- PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL
- Some properties were renamed, and sometimes even shadowed by new ones
- New getter methods (some virtual) were added
2018-01-12 00:58:14 +02:00
poke1024 c1db81b9ed Fixes empty line selection when scrolling 2018-01-11 06:51:20 +01:00
Bernhard Liebl 3af5dfbbf3 Fix whole word search missing occurences 2018-01-08 22:50:33 +01:00
Ian b3ad2538d0 fix center viewport out of size error, #15411 2018-01-06 18:06:09 -05:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde 32bb236f24
Merge pull request #15334 from poke1024/textedit-mousepos
Fix TextEdit::_get_mouse_pos rounding errors
2018-01-04 19:53:43 +01:00
Bernhard Liebl cc64679a20 Fix TextEdit::_get_mouse_pos rounding errors 2018-01-04 18:30:15 +01:00
Rémi Verschelde 023c04689e
Merge pull request #15308 from ianb96/horizontal_scrolling
TextEdit horizontal scrolling with shift
2018-01-04 01:35:38 +01:00
Rémi Verschelde f9f6f250e6
Merge pull request #15191 from Jerome67000/z_renaming
renames "z" Node2D property to "z_index"
2018-01-04 00:41:45 +01:00
Ian ae6b7c0b41 TextEdit horizontal scrolling with shift 2018-01-03 17:21:54 -05:00
Jerome67000 42ae3525a3 #15078 renamed "z" -> "z_index" property in Node2D 2018-01-03 13:02:26 +01:00
Rémi Verschelde e3c744f9f1
Merge pull request #15127 from poke1024/smooth-scroll-play
Remove some lagginess from TextEdit's smooth scrolling
2018-01-03 11:34:42 +01:00
Rémi Verschelde 592b0fc068
Merge pull request #15063 from poke1024/textedit-select-last-line
Fix key down on last line in TextEdit
2018-01-03 10:30:51 +01:00
Rémi Verschelde d7d8fc6c20
Merge pull request #14983 from Paulb23/keyboard_selection_issue_14675
Fixed keyboard word selection when at the start/end of line, issue 14675
2018-01-02 11:19:34 +01:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Noshyaar 97d7f689e1
Merge pull request #14972 from poke1024/fix-unindent-col-0
Fix unindent (shift-tab) on column 0
2018-01-01 18:52:06 +07:00
Noshyaar a6328011d8
Merge pull request #14973 from poke1024/docs-word-selection
Double-click word selection for RichTextLabel (i.e. docs)
2018-01-01 18:51:35 +07:00
Bernhard Liebl 2897523d12 Fix unindent (shift-tab) on column 0 and more 2017-12-28 17:48:40 +01:00
Bernhard Liebl b80bc553dd Double-click word selection for RichTextLabel (i.e. docs) 2017-12-28 17:44:22 +01:00
Bernhard Liebl d640542f6d Remove some lagginess from TextEdit's smooth scrolling 2017-12-28 15:49:37 +01:00
Ian 19c3f4c4c1 fix indent selection crash 2017-12-26 12:13:17 -08:00
Bernhard Liebl 076a5f35fc Fix shift-key down on last line in TextEdit 2017-12-26 08:32:30 +01:00
Poommetee Ketson 6c897707ca Add missing parameter names 2017-12-25 21:19:56 +07:00
Paulb23 a11a691b17 Fixed keyboard word selection when at the start/end of line, issue 14675 2017-12-23 14:47:04 +00:00
MattUV a55870cd81 Adds an option to move cursor with right click in TextEdit
Fixes #14832
- Added an option in the editor settings/cursor to make the cursor move with right click.
- If the option is activated (true by default), a right click will move the cursor before displaying context menu.
 - If there is a selection, a right click on it will keep it selected, a right click outside it will unselect it.
 - The option is available in textEdit via an inspector property (or via GDScript): caret_moving_by_right_click
 - The option is available in the script editor and the shader editor via the editor settings
 - The documentation has been updated with the new property, and a few other entries in TextEdit.xml.
2017-12-20 09:01:09 +01:00
Bernhard Liebl abfcce0067 Fix cut-copy-line breaking paste (issue 14539) 2017-12-17 16:24:23 +01:00
Rémi Verschelde d03f35f1bc Bind TextEdit.deselect and update documentation 2017-12-16 21:08:31 +01:00
MattUV db020f3cea Modifies indentation behaviours
Partially fixes #14559 (see the issue for details);
Removes some code redondancy ;
Adds the possibility to indent left and right without selecting text ;
Adds the entries to the context menu when text is not selected ;
Renames indent_selection_left() and indent_selection_right() to indent_left() and indent_right() ;
Unifies context menus of shader text editor and script text editor.
2017-12-15 10:04:56 +01:00