Commit graph

704 commits

Author SHA1 Message Date
Paulb23
2e2a049d3c Improve performance of connection info in the script editor 2019-10-27 11:07:19 +00:00
Paulb23
df0c8386a9 Fix text minimap crash when last line is folded 2019-10-26 13:37:25 +01:00
Marian
3322d19cb3 Just initialization, needed by compiler 2019-10-25 16:14:24 +02:00
Marian
616f02e905 Fixed indenting issue with comment at end of line 2019-10-25 15:01:43 +02:00
Zatherz
72d2248276 Don't terminate search if begin_key doesn't fit
Previously this code would continue onto the next iteration of the loop if the line was smaller in size than begin_key, meaning that a situation where begin_key.length() > end_key.length() would cause weird behavior with newlines. Now both the checks for begin_key and end_key are in their own condition and do not skip the entire iteration if they can't be found.
2019-10-24 21:59:02 +02:00
volzhs
63e6b1ecce Fix rendering tooltip 2019-10-24 22:48:20 +09:00
Rémi Verschelde
78848bbfea
Merge pull request #32796 from Paulb23/set_text_caret
Changed `set_text` to place caret at start of the text.
2019-10-22 22:44:12 +02:00
Rémi Verschelde
9f28803927
Merge pull request #32940 from nekomatata/text-edit-clear-colors
TextEdit syntax highlighting fixes
2019-10-22 20:40:20 +02:00
Rémi Verschelde
97a4fe79fb
Merge pull request #32902 from nekomatata/auto-indent-bracket-fix
Auto-indent after opening bracket and parenthesis in the script editor
2019-10-22 14:30:16 +02:00
PouleyKetchoupp
4247c21cb0 TextEdit syntax highlighting fixes
- Fixed visual update when using add_keyword_color(), add_color_region(), clear_colors() in scripts
- More accurate description for clear_colors() in TextEdit documentation
2019-10-20 17:40:09 +02:00
Paulb23
ee94081b4a Fixed -1 minimap index when smooth scrolling is enabled 2019-10-20 13:27:53 +01:00
PouleyKetchoupp
74d7cbf920 Auto-indent after opening bracket and parenthesis in the script editor
This change makes auto-indent work the same way as for curly brackets, so '[', '(', '{' all act the same.

Fixes #32897
2019-10-18 11:02:05 +02:00
qarmin
616ab4fac2 Small fixes to redundand code, copy paste bugs 2019-10-14 11:40:55 +02:00
Paulb23
d579d2bf1d Fix undo / redo scrollbar calulations 2019-10-13 15:34:28 +01:00
Paulb23
aea0761b25 Place caret at 0,0 when setting text not at the end 2019-10-13 15:29:20 +01:00
Paulb23
e5b18cea63 Fixed inserting text at caret not updating scrollbar size 2019-10-07 19:17:32 +01:00
Paulb23
6025a76c78 Fixed drawing the caret at eol when at eol is not visible 2019-10-07 17:24:58 +01:00
lupoDharkael
cb22a875aa TextEdit: Fix timer inside tree warning 2019-09-27 13:57:20 +02:00
Rémi Verschelde
dec10dd776
Merge pull request #32051 from qarmin/some_error_explanation
Added some obvious errors explanations
2019-09-25 11:51:54 +02:00
qarmin
17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Rémi Verschelde
fc47569be9
Merge pull request #32232 from Paulb23/issue_32070_goto_doc_when_selecting
Fixed going to doc reference while selecting text
2019-09-23 15:00:41 +02:00
Rémi Verschelde
0928e82027
Merge pull request #29895 from ptrojahn/menukey
Support menu key in TextEdit and LineEdit controls
2019-09-22 21:21:13 +02:00
Paul Trojahn
ba24bc1e04 Support menu key in TextEdit and LineEdit controls
Related to #15542
2019-09-22 12:06:24 +02:00
Paulb23
ef3455f236 Fixed going to doc reference while selecting text 2019-09-21 13:45:20 +01:00
Rémi Verschelde
48db920f4a
Merge pull request #32190 from KoBeWi/undo_redo_stuff
Fix autocompletion undo
2019-09-20 17:22:11 +02:00
Rémi Verschelde
fdc2463a1b
Merge pull request #32150 from luzpaz/typos
Fix misc. source comment typos
2019-09-20 17:09:05 +02:00
luz.paz
91ecd7b6a6 Fix misc. source comment typos
Found using `codespell -q 3 -S ./thirdparty,*.po -L ang,ba,cas,dof,doubleclick,fave,hist,leapyear,lod,nd,numer,ois,paket,seeked,sinc,switchs,te,uint -D ~/Projects/codespell/codespell_lib/data/dictionary.txt `
2019-09-19 14:36:52 -04:00
Rémi Verschelde
fae14153f7
Merge pull request #31188 from codecustard/LineEdit_disable_shortcuts
Add Ability to Enable/Disable Shortcuts and Selection for LineEdit/TextEdit
2019-09-19 19:56:59 +02:00
Tomasz Chabora
d630472b98 Fix autocompletion undo 2019-09-18 16:26:33 +02:00
Emmanuel Barroga
b678d68224 Add Ability to Enable/Disable Shortcuts for LineEdit/TextEdit
This PR adds the ability to enable/disable shortcut keys and selection for LineEdit/TextEdit. It also updates the context menu when you disable/enable the shortcut keys or selection.
2019-09-07 06:06:36 -07:00
PouleyKetchoupp
5fdea32622 TextEdit & LineEdit caret blink timers run only when focused (fixes #31936) 2019-09-04 13:06:15 +02:00
amakarenko
544c39d1e7 Fix editor infinit loop in search_prev
Fixes godotengine#31328
2019-09-02 15:15:55 +03:00
Michael Alexsander Silva Dias
5f28a2f978 Fix multiline texts not updating its contents correctly in the inspector 2019-09-02 01:17:11 -03:00
Paulb23
b1aaeb07ea Fix minimap drag when height is less then control size 2019-08-31 15:43:19 +01:00
Rémi Verschelde
9fc359411f
Merge pull request #31803 from KoBeWi/minicursor
Don't change cursor when minimap is disabled
2019-08-30 20:08:21 +02:00
Tomasz Chabora
b0805a1b53 Don't change cursor when minimap is disabled 2019-08-30 19:13:53 +02:00
Tomasz Chabora
b55b3d71a8 Perform symbol lookup on button release 2019-08-30 16:19:25 +02:00
Michael Alexsander Silva Dias
9c36d893e3 Fix Multiline texts not updating correcly inside arrays 2019-08-26 13:47:33 -03:00
Rémi Verschelde
0985d5fa99
Merge pull request #31496 from nekomatata/fix-text-edit-insert-selection
Update TextEdit selection when inserting line
2019-08-25 22:33:23 +02:00
Rémi Verschelde
41b5c62952
Merge pull request #31654 from Paulb23/minimap_fixes
Viewport highlight, colour cache and minimap scrolling fixes.
2019-08-25 22:32:05 +02:00
Paulb23
32d5427f55 Refactor TextEdit control height calculations 2019-08-25 14:49:13 +01:00
PouleyKetchoupp
bc839ed3f3 Update TextEdit selection & cursor when inserting line
Fixes #31458
2019-08-25 15:43:45 +02:00
Paulb23
c5b5c6b49b Minimap scroll now acts similar to scrollbar 2019-08-25 14:43:11 +01:00
Yuri Roubinski
4efa1b6906 Disallow undo/redo in readonly TextEdit's 2019-08-25 09:57:59 +03:00
Paulb23
ec4d2b26ec Fixed syntax highlighting cache not clearing final line 2019-08-24 15:21:45 +01:00
Paulb23
b75c2b6d76 Adjust viewport colour based on background colour 2019-08-24 14:33:55 +01:00
Paulb23
a5c1830a43 Fix minimap mouse click resolving to -1 2019-08-22 20:07:16 +01:00
Paulb23
0cea72273f Add minimap to text_edit 2019-08-21 23:48:46 +01:00
Paulb23
895a15b321 Add syntax highlighting cache 2019-08-21 23:36:49 +01:00
geequlim
545b46ac2f Fix filter quotes wraped insert completion options 2019-08-21 22:11:36 +08:00
Michael Alexsander Silva Dias
2fa32d69a5 Keep syntax highlighting on TextEdit in readonly mode 2019-08-18 14:00:12 -03:00
Michael Alexsander Silva Dias
f8a986c094 Fix autocompletion widget having its text leak outside 2019-08-15 14:52:37 -03:00
Hugo Locurcio
9e1c23a353
Reorganize various menus for consistency and conciseness
- Clean up the recent scripts dialog to match the recent scenes dialog
- Add "..." at the end of shortcuts that cause a modal dialog to appear

This closes #31148.
2019-08-13 11:52:10 +02:00
Shiqing
94d542042e Fix incorrect X position of line length guideline 2019-07-10 17:29:43 +08:00
Rémi Verschelde
2633efd55b
Merge pull request #28190 from griant/test
fix improper uncommenting behavior in TextEditor
2019-07-09 08:56:27 +02:00
geequlim
4afb31cd52 Fix light area position in the selected completion 2019-07-06 12:15:32 +08:00
Geequlim
10cfd87414 Show icons for code completion options 2019-07-05 09:25:50 +08:00
Rémi Verschelde
867f38a626
Merge pull request #29572 from qarmin/fix_text_edit_select
Fix TextEdit Select crash
2019-07-01 13:49:06 +02:00
Hugo Locurcio
a2f8297480
Draw the script editor's line length guideline below characters
This prevents characters from looking strange if they cross the
line length guideline.
2019-06-30 23:47:01 +02:00
Rémi Verschelde
eaaff9da31
Merge pull request #29941 from qarmin/redundant_code_and_others
Remove redundant code, possible NULL pointers and others
2019-06-27 01:05:18 +02:00
qarmin
4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
Gwyneth Lowe
45f78d786a Give TextEdit a custom color for font when read only is set
Previously there was some transparency hard coded into TextEdit when in read only mode.
This change adds a custom color for adjusting the font in read only mode.
It also applies when syntax highlighting is on.
2019-06-24 20:00:05 -05:00
Gwyneth Lowe
7142064110 Correct typo that broke custom selected font color
Change several font_selected_color to font_color_selected; the actual name of the override
2019-06-24 04:55:29 -05:00
Dawid Wdowiak
0f14489ecb Center script line when double clicked on error in debugger 2019-06-23 15:58:07 +02:00
qarmin
532a7ba06a Fix TextEdit Select 2019-06-20 17:13:16 +02:00
Tomasz Chabora
e5cfb9d6b2 Fix selection undo... for real 2019-06-17 03:54:28 +02:00
Paulb23
1d55207fd2 Fix TextEdit cursor.column having a negative value 2019-06-14 21:48:16 +01:00
Rémi Verschelde
df25679235
Merge pull request #29601 from NilsIrl/hiding_enabled
Treat hiding_enabled as bool throughout
2019-06-12 14:23:27 +02:00
Rémi Verschelde
6d16f2f053 Fix error macro calls not ending with semicolon
It's not necessary, but the vast majority of calls of error macros
do have an ending semicolon, so it's best to be consistent.
Most WARN_DEPRECATED calls did *not* have a semicolon, but there's
no reason for them to be treated differently.
2019-06-11 14:49:34 +02:00
Nils ANDRÉ-CHANG
e4f90337f2 Treat hiding_enabled as bool throughout 2019-06-08 12:37:57 +01:00
qarmin
8d993f6357 Fix crash with get_keywords_color 2019-06-06 12:59:29 +02:00
Rémi Verschelde
774a9fde84
Merge pull request #26848 from ptrojahn/utf8navigation
Support UTF-8 in TextEdit and LineEdit navigation
2019-06-03 22:28:54 +02:00
Rémi Verschelde
556ee71277
Merge pull request #29174 from Chaosus/fix_line_wrap_output
Fix "Index out of size" TextEdit's spam to output (when using Expression nodes in the visual shaders)
2019-05-28 10:21:54 +02:00
Tomasz Chabora
90ea9dfede Fix TextEdit blocking scroll without scrollbar 2019-05-26 20:51:08 +02:00
Chaosus
e5f5a71d27 Fix "Index out of size" TextEdit's spam to output 2019-05-25 20:57:32 +03:00
Rémi Verschelde
71c784f796
Merge pull request #29078 from KoBeWi/scroll_stuff
Improvements to scroll handling
2019-05-24 19:56:15 +02:00
Rémi Verschelde
f173d242a2
Merge pull request #28811 from iwek7/editor_remove_spaces_to_closes_indention
Change rules of indenting for spaces
2019-05-24 16:21:04 +02:00
Tomasz Chabora
01491aaf32 Improvements to scroll handling 2019-05-24 14:56:39 +02:00
Michael Alexsander Silva Dias
de378ef012 Fix 'TextEdit's line wrapping being highlighted incorrectly
Fixes #22867.
2019-05-22 18:45:24 -03:00
Ibrahn Sahir
d8a5fcd3d1 Initialize readonly/editable in LineEdit and TextEdit controls 2019-05-21 21:50:02 +01:00
Rémi Verschelde
63e7d2db08
Merge pull request #28218 from KoBeWi/b00km4rk5
Add bookmarks for easier code navigation
2019-05-20 22:39:19 +02:00
Rémi Verschelde
fdea3d48b0
Merge pull request #26809 from KoBeWi/undo_set_text_like_a_boss
Allow to undo TextEdit.set_text
2019-05-20 22:00:39 +02:00
Rémi Verschelde
e0574e1d98 Fix typos with codespell
Using codespell 1.15.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
doubleclick
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-05-19 13:10:35 +02:00
Max Hilbrunner
ee5ba3e097
Merge pull request #28366 from iwek7/feature/issue28355/showSpacesInEditor
Add feature to show spaces in code editor
2019-05-17 20:38:40 +02:00
Paulb23
a8a0392c12 Fix text_edit drawing incorrect chars when syntax highlighting enabled 2019-05-16 22:32:06 +01:00
Tomasz Chabora
3bc0445e05 Allow to undo TextEdit.set_text 2019-05-16 23:05:17 +02:00
miwanczuk
cbc68a3e04 Change rules of indenting for spaces
Now indentations and deindentations of spaces attemt to align text to
closest full indent level. It works with tab/tab+shift (both with
selection and no selection) as well as backspace. Also fixes bug where
selection and cursor position were mispaced after (un)indenting selected
text.
2019-05-11 10:30:40 +02:00
Tomasz Chabora
0bfcf8bc2f Add bookmarks for easier code navigation 2019-05-05 18:57:53 +02:00
megalike
c6310e9a7e Support Mac OS default delete char hotkeys 2019-05-04 17:15:32 +03:00
megalike
39398f173e Fix Mac OS move cursor behaviour 2019-05-02 21:13:41 +03:00
Rémi Verschelde
2f74e6b854
Merge pull request #28559 from megalike/mac_os_move_cursor_hotkeys
Support Mac OS default move cursor hotkeys
2019-05-01 15:08:30 +02:00
megalike
17d14fe511 Support Mac OS default move cursor hotkeys
Add missing FALLTHROUGH define
2019-05-01 13:45:00 +03:00
miwanczuk
c86b03abd8 Expose TextEdit's drawSpaces feature to GDScript 2019-05-01 11:32:54 +02:00
Rémi Verschelde
f3eafcec1a
Merge pull request #25350 from Connall/master
Fix "Auto Brace Complete" inserting extra quotation character sometimes in a string.
2019-05-01 10:32:41 +02:00
Rémi Verschelde
59b553b2af
Merge pull request #28493 from mitchcurtis/mac-line
Make Command + Left go to first non-whitespace character
2019-05-01 08:25:40 +02:00
Rémi Verschelde
5f3dd5fdc7
Merge pull request #28481 from iwek7/issue28446/highlighingOfWhitespaces
Disable higlighting all occurences of selection in editor if it contains only whitespaces
2019-04-30 18:31:53 +02:00
miwanczuk
fda3a568ef Issue-28355 - show spaces in editor 2019-04-30 14:57:48 +02:00
Rémi Verschelde
2cc8848c3c
Merge pull request #26224 from hilfazer/autocomplete
Working autocomplete for $" and $'
2019-04-30 13:32:37 +02:00
Rémi Verschelde
9916319df8
Merge pull request #27693 from YeldhamDev/method_brackets_smart
Make brackets only be inserted when necessary when autocompleting methods
2019-04-30 11:11:08 +02:00
Rémi Verschelde
ea30bcdfef
Merge pull request #28287 from YeldhamDev/text_editable_contextmenu
Make 'Line/TextEdit's context menus hide their editing options when in readonly mode
2019-04-30 10:15:47 +02:00
Rémi Verschelde
d0e628fa55
Merge pull request #28334 from YeldhamDev/popup_buttons_scale
Make buttons that trigger popups have the same scale
2019-04-30 10:15:02 +02:00
miwanczuk
1001c7fdde issue-28446 - disable higlighting all occurences of string in editor if only whitespaces are selected 2019-04-30 09:59:59 +02:00
Michael Alexsander Silva Dias
f7a45eb0de Make 'Line/TextEdit's context menus hide their editing options when in readonly mode
Fixes #28243.
2019-04-29 14:03:31 -03:00
Rémi Verschelde
23147ae2c3
Merge pull request #28101 from MunWolf/debugger_cursor
Added a marker in text_edit that tells which row is executing.
2019-04-29 18:38:38 +02:00
Michael Alexsander Silva Dias
b8e09f98c4 Make buttons that trigger popups have the same scale 2019-04-29 13:07:47 -03:00
Rémi Verschelde
6822ee37dd
Merge pull request #28281 from zqyoung1/fix-selection-undo
Fix selection undo
2019-04-29 17:25:14 +02:00
Rémi Verschelde
1af18ab235
Merge pull request #28399 from YeldhamDev/textedit_expose_tab_fold
Expose 'TextEdit's tab drawing and folding to GDScript
2019-04-29 17:04:46 +02:00
Mitch Curtis
b0956915c9 macOS: make Command + Left go to first non-whitespace character
Instead of going to column 0. This matches the behaviour of other
popular IDEs.

Fixes #28462.
2019-04-28 17:51:47 +02:00
Michael Alexsander Silva Dias
350bcce041 Expose 'TextEdit's tab drawing and folding to GDScript 2019-04-24 12:42:12 -03:00
Michael Alexsander Silva Dias
4bca3236d1 Make small changes to the new connection info on script feature 2019-04-24 03:13:25 -03:00
Rikhardur Bjarni Einarsson
9bfa63496a Added a marker in text_edit that tells which row is executing. 2019-04-23 21:51:01 +01:00
hilfazer
17166f5640 autocomplete for $" and $' 2019-04-22 12:53:24 +02:00
Rémi Verschelde
22457b907e
Merge pull request #28234 from Paulb23/connection_info_on_script
Display connection information in the script editor
2019-04-22 11:52:13 +02:00
Zach Young
516b80cd65 Fix completely #14835 -proper selection reset on undo 2019-04-21 17:20:58 -04:00
Paulb23
a6562cd004 Display connection information in the script editor 2019-04-20 13:13:54 +01:00
griant
eb5807984c fix improper uncommenting behavior in TextEditor 2019-04-19 15:39:57 +08:00
Paulb23
6ea253aa77 Restore script editor state between sessions 2019-04-13 13:07:12 +01:00
Juan Linietsky
9f4b5a91c0 Reorganized connection dialog for much improved ease of use.
-Removed dest path field
-Added a "Source" signal
-Added an "Advanced" button to hide complexity
-Fix bug on Tree to make sure "ensure visible" works on hidden trees
-Fix bug on TextEdit to ensure signals created with script not open sill focus the right line
2019-04-11 23:23:24 -03:00
Rémi Verschelde
fc370b3feb Fix -Wimplicit-fallthrough warnings from GCC 8
Adds `FALLTHROUGH` macro to specify when a fallthrough is intentional.
Can be replaced by `[[fallthrough]]` if/when we switch to C++17.

The warning is now enabled by default for GCC on `extra` warnings level
(part of GCC's `-Wextra`). It's not enabled in Clang's `-Wextra` yet,
but we could enable it manually once we switch to C++11. There's no
equivalent feature in MSVC for now.

Fixes #26135.
2019-04-05 15:14:53 +02:00
Michael Alexsander Silva Dias
24137f423a Make brackets only be inserted when necessary when autocompleting methods 2019-04-04 23:06:44 -03:00
Paul Trojahn
8851e16f75 Support UTF-8 in TextEdit and LineEdit navigation
This allows jumps over whole non ASCII words with Ctrl+Left/Right in
a LineEdit or TextEdit.
Fixes #25681
2019-03-09 20:08:40 +01:00
Vasiliy Makarov
a3d9b7d916 Check cursor line and column
Added a trivial check if cursor.line and cursor.column are valid.
Fix #26245
2019-03-05 18:27:37 +03:00
marxin
8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +01:00
ianb96
39f537e481 Fix word wrap cutoff and tab wrapping issue 2019-02-20 08:52:33 -05:00
qarmin
7a254b303b Fix copy text when TextEdit is readonly 2019-02-16 07:56:24 +01:00
Paulb23
69374cd378 Fixed selection being activated when using scroll lines 2019-02-04 10:55:45 +00:00
Connall Lindsay
11f4b5efc5 Brace completion for quotation marks was introducing another quotation mark at the end of the
string, I think because it wasn't checking that the quotation mark didn't exist at the current
cursors position. Simple change, that fixed the issue and stood up to testing. Issue #25084
2019-01-26 17:03:11 +00:00
Michael Alexsander Silva Dias
9c69d7f339 Appease some CppCheck warns for files in the "scene" directory 2019-01-16 12:59:18 -02:00
bruvzg
55bc004a73
Update IME text only for focused input controls. 2019-01-08 22:52:56 +02:00
Timo Schwarzer
3b2e03cf0b
Fix jumping when scrolling down fast with smooth scroll enabled
Fixes #24773
2019-01-06 10:22:38 +01:00
Paulb23
411df08711 Fix text edit wrapping beyond control size, issue 23896 2019-01-05 16:58:54 +00:00
Rémi Verschelde
65a86ae17c
Merge pull request #24683 from SoIAS/autocompletion_menu_position_24674
Fixed autocompletion menu vertical position
2019-01-03 21:33:12 +01:00
Dawid Wdowiak
615ca1d59e Fixed autocompletion menu vertical position 2019-01-03 07:11:40 +01:00
Rémi Verschelde
b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Rémi Verschelde
e86418f7a9
Merge pull request #24566 from thomasruiz/fix/completion-box-center-text-vertically
Center lines vertically in completion box
2018-12-27 08:55:17 +01:00
Thomas Ruiz
d2fa0658a2
Fix caret size with font smaller than row height 2018-12-23 14:29:33 +01:00
Thomas Ruiz
7fb0853c68
Center lines vertically in completion box 2018-12-23 12:19:27 +01:00
Paulb23
f1c6947702 Fix Word wrap cache desync causing crash 2018-12-18 13:12:46 +00:00
Rémi Verschelde
2f31d31c23
Revert "Use more subtle indentation guides in the script editor" 2018-12-13 19:57:34 +01:00
Rémi Verschelde
4c41e29c8e
Merge pull request #23923 from bruvzg/ime_gdscript
Changes IME to make it possible to use it from gdscript/gdnative
2018-12-11 18:00:48 +01:00
Rémi Verschelde
3a312dbd32
Merge pull request #20725 from Calinou/textedit-subtle-indent-guides
Use more subtle indentation guides in the script editor
2018-12-09 23:10:32 +01:00
allkhor
7831cd76ab TextEdit: added redo option to the context menu 2018-11-29 23:21:43 +06:00
Kanabenki
99ffd748f1 Add suggestions ignoring case at the end of the code autocomplete 2018-11-26 16:36:46 +01:00
allkhor
594e0261f3 TextEdit: remove selection when clear happens. 2018-11-25 23:24:49 +06:00
bruvzg
4554c682e6
Changes IME input to use notification instead of callback, exposes IME methods to gdscript/gdnative. 2018-11-23 14:07:48 +02:00
Juan Linietsky
f2e54057ae -Moved EditorDefaultValue to ClassDB, made it core
-Removed one and zero hints for properties, replaced by default value
2018-11-08 11:30:59 -03:00
zhagsenkk
67ba4dc8cd Remove no longer necessary "raise_from_completion" in TextEdit
This is no longer needed to fix #1257 because the code-autocomplete hint stops
at the script editor’s edge now.
And #6690 will not arise because it is just caused by "raise_from_completion".

Fixes #22504 and fixes #16064.
2018-10-26 19:29:51 +02:00
Rémi Verschelde
1169196f04
Merge pull request #22779 from Superwaitsum/LimitSettings
Limit several project settings
2018-10-25 11:38:06 +02:00
Superwaitsum
e5041ad0f5 Add some limits on the Editor Settings 2018-10-24 19:46:33 -05:00
OsamaElHariri
317f7c91a2 A colon ending a comment line no longer indents the next line 2018-10-10 00:36:12 +03:00
Rémi Verschelde
dda6d80598
Merge pull request #22742 from YeldhamDev/textedit_margin_scroll
Fix TextEdit margin start spacing with two scrollbars
2018-10-06 13:32:08 +02:00
Kellam Spencer
f51ce0f7b1 Fix to scrolling, rounding error on max_v_scroll 2018-10-05 16:50:49 -04:00
Michael Alexsander Silva Dias
8a64a44e0e Fix TextEdit margin start spacing with two scrollbars 2018-10-04 19:38:08 -03:00
Hugo Locurcio
9c1d4f9da2
Use more subtle indentation guides in the script editor 2018-10-03 00:00:25 +02:00
Rémi Verschelde
01e1c6e8b6
Merge pull request #22560 from lupoDharkael/clipboard
TextEdit: prevent the copy of an empty string
2018-09-30 22:49:45 +02:00
lupoDharkael
f5f948210c TextEdit: prevent the copy of an empty string 2018-09-30 17:17:29 +02:00
Paulb23
f08eead3a2 Fix code folding taking into account empty lines, issue 15689 2018-09-29 18:08:56 +01:00
elasota
9cf689183d Fix some wchar_t truncations 2018-09-28 00:31:15 -04:00
Rémi Verschelde
d95bbb8922 Fix warnings about set but unused variables [-Wunused-but-set-variable]
Fixes the following GCC 5 warnings:
```
drivers/gles2/rasterizer_canvas_gles2.cpp:814:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:2270:11: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:2673:22: warning: variable 'e' set but not used [-Wunused-but-set-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:715:7: warning: variable 'no_cull' set but not used [-Wunused-but-set-variable]
drivers/gles2/shader_gles2.cpp:693:14: warning: variable 'cc' set but not used [-Wunused-but-set-variable]
drivers/gles3/rasterizer_canvas_gles3.cpp:1226:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable]
drivers/gles3/rasterizer_scene_gles3.cpp:3039:10: warning: variable 'contrib' set but not used [-Wunused-but-set-variable]
drivers/gles3/rasterizer_scene_gles3.cpp:4504:32: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable]
editor/editor_inspector.cpp:272:9: warning: variable 'guide_color' set but not used [-Wunused-but-set-variable]
editor/editor_themes.cpp:1067:14: warning: variable 'alpha3' set but not used [-Wunused-but-set-variable]
editor/editor_themes.cpp:263:8: warning: variable 'script_bg_color' set but not used [-Wunused-but-set-variable]
editor/plugins/collision_shape_2d_editor_plugin.cpp:326:11: warning: variable 'cpoint' set but not used [-Wunused-but-set-variable]
editor/plugins/mesh_editor_plugin.cpp:72:9: warning: variable 'size' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:471:12: warning: variable 'mpos' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:89:8: warning: variable 'basetype_color' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:90:8: warning: variable 'type_color' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:92:8: warning: variable 'string_color' set but not used [-Wunused-but-set-variable]
modules/visual_script/visual_script_editor.cpp:2521:7: warning: variable 'seq_connect' set but not used [-Wunused-but-set-variable]
platform/android/export/export.cpp:580:12: warning: variable 'styles_count' set but not used [-Wunused-but-set-variable]
platform/android/export/export.cpp:584:12: warning: variable 'styles_offset' set but not used [-Wunused-but-set-variable]
platform/osx/export/export.cpp:464:9: warning: variable 'zerr' set but not used [-Wunused-but-set-variable]
scene/2d/tile_map.cpp:260:10: warning: variable 'tcenter' set but not used [-Wunused-but-set-variable]
scene/3d/light.cpp:166:7: warning: variable 'editor_ok' set but not used [-Wunused-but-set-variable]
scene/3d/navigation.cpp:566:11: warning: variable 'closest_navmesh' set but not used [-Wunused-but-set-variable]
scene/gui/rich_text_label.cpp:869:8: warning: variable 'size' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:705:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:706:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:726:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:727:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable]
scene/resources/material.cpp:430:7: warning: variable 'using_world' set but not used [-Wunused-but-set-variable]
servers/visual/shader_language.cpp:2026:7: warning: variable 'all_const' set but not used [-Wunused-but-set-variable]
servers/visual/visual_server_scene.cpp:1383:28: warning: variable 'z_max_cam' set but not used [-Wunused-but-set-variable]
```

Also fixes two [-Wunused-value] warnings:
```
scene/gui/text_edit.cpp:4405:20: warning: statement has no effect [-Wunused-value]
servers/visual/visual_server_scene.cpp:905:48: warning: value computed is not used [-Wunused-value]
```

Some of those are bugs and need further work, they are identified with
`// FIXME` comments.
2018-09-27 16:25:24 +02:00
Rémi Verschelde
cda5b0bfe1 Fix warnings about unused variables [-Wunused-variable]
Fixes the following GCC 5 warnings:
```
drivers/gles2/rasterizer_scene_gles2.cpp:1139:15: warning: unused variable 'offset' [-Wunused-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:1205:39: warning: unused variable 'multi_mesh' [-Wunused-variable]
drivers/gles2/rasterizer_storage_gles2.cpp:359:7: warning: unused variable 'srgb' [-Wunused-variable]
drivers/gles2/shader_gles2.cpp:1016:45: warning: unused variable 'texture_hints' [-Wunused-variable]
editor/animation_track_editor.cpp:776:9: warning: unused variable 'keys_to' [-Wunused-variable]
editor/editor_inspector.cpp:273:7: warning: unused variable 'vs_height' [-Wunused-variable]
editor/editor_themes.cpp:202:10: warning: unused variable 'begin_time' [-Wunused-variable]
editor/editor_themes.cpp:239:10: warning: unused variable 'end_time' [-Wunused-variable]
editor/plugins/animation_blend_tree_editor_plugin.cpp:726:17: warning: unused variable 'an' [-Wunused-variable]
editor/plugins/script_text_editor.cpp:1278:8: warning: unused variable 'fold_state' [-Wunused-variable]
main/main.cpp:132:13: warning: 'use_vsync' defined but not used [-Wunused-variable]
modules/cvtt/image_compress_cvtt.cpp:231:8: warning: unused variable 'y_end' [-Wunused-variable]
modules/cvtt/image_compress_cvtt.cpp:311:6: warning: unused variable 'shift' [-Wunused-variable]
modules/gdscript/gdscript_editor.cpp:58:7: warning: unused variable 'th' [-Wunused-variable]
modules/gridmap/grid_map.cpp:1084:6: warning: unused variable 'ofs' [-Wunused-variable]
modules/theora/video_stream_theora.cpp:442:9: warning: unused variable 'tr' [-Wunused-variable]
modules/visual_script/visual_script_editor.cpp:2606:6: warning: unused variable 'count' [-Wunused-variable]
modules/visual_script/visual_script_editor.cpp:2829:6: warning: unused variable 'seq_count' [-Wunused-variable]
modules/visual_script/visual_script_editor.cpp:2844:24: warning: unused variable 'vnode_function' [-Wunused-variable]
modules/websocket/lws_peer.cpp:122:12: warning: unused variable 'peer_data' [-Wunused-variable]
modules/websocket/lws_peer.cpp:135:12: warning: unused variable 'peer_data' [-Wunused-variable]
modules/websocket/lws_peer.cpp:63:12: warning: unused variable 'peer_data' [-Wunused-variable]
modules/websocket/lws_peer.cpp:91:12: warning: unused variable 'peer_data' [-Wunused-variable]
platform/android/export/export.cpp:763:16: warning: unused variable 'node_size' [-Wunused-variable]
scene/gui/rich_text_label.cpp:850:10: warning: unused variable 'x_ofs' [-Wunused-variable]
scene/gui/text_edit.cpp:653:8: warning: unused variable 'tab_w' [-Wunused-variable]
scene/resources/bit_mask.cpp:186:6: warning: unused variable 'i' [-Wunused-variable]
scene/resources/mesh.cpp:549:20: warning: '_array_name' defined but not used [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:107:10: warning: unused variable 'v2' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:108:10: warning: unused variable 'v3' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:109:10: warning: unused variable 'v4' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:110:10: warning: unused variable 'v5' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:111:10: warning: unused variable 'v0n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:112:10: warning: unused variable 'v1n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:113:10: warning: unused variable 'v2n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:114:10: warning: unused variable 'v3n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:115:10: warning: unused variable 'v4n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:116:10: warning: unused variable 'v5n' [-Wunused-variable]
servers/visual/default_mouse_cursor.xpm:2:21: warning: 'default_mouse_cursor_xpm' defined but not used [-Wunused-variable]
```
2018-09-27 16:25:24 +02:00
Rémi Verschelde
1a16dabfb5
Merge pull request #21982 from luzpaz/misc-typos
Misc. typos
2018-09-13 10:59:00 +02:00
luz.paz
08bde5b2de Misc. typos
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12 21:39:17 -04:00
Guilherme Felipe
51e854846e Fix default_cursor_shape for TextEdit 2018-09-12 13:26:51 -03:00
Rémi Verschelde
06667b2fcf
Merge pull request #21219 from AlexHolly/fix-textedit-shows-nothing
TextEdit update cache.size on ENTER_TREE
2018-09-12 17:41:12 +02:00
Rémi Verschelde
277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
Rémi Verschelde
e883edfac9
Merge pull request #21872 from Paulb23/fix_backwards_search
Fix backwards search in TextEdit selecting non-whole words, issue 15677
2018-09-10 18:52:35 +02:00
Rémi Verschelde
87e0563116
Merge pull request #21491 from AlexHolly/fix-textedit-uncomment-spamm
Uncommenting a selection was not updating the selection.
2018-09-10 18:48:41 +02:00
Paulb23
e474b4a444 Fix backwards search in TextEdit selecting non-whole words, issue 15677 2018-09-08 14:54:41 +01:00
Paulb23
f051f5110e Fixed scientific notaion not highlighting correctly, issue 21435 2018-09-08 13:42:11 +01:00
Alexander Holland
5cb66b2776 Uncommenting a selection was not updating the selection.
Also adds uncomment lines(ctrl+u) where # is not in first place
2018-09-08 14:21:15 +02:00
Alexander Holland
f2da51620d TextEdit replaced cache.size with get_size() 2018-08-25 16:21:47 +02:00
Rémi Verschelde
6ce4078c5f
Merge pull request #20586 from AlexHolly/text-edit-auto-completion
text_edit auto_completion
2018-08-24 20:48:01 +02:00
Rémi Verschelde
52466d57e9 Make some debug prints verbose-only, remove others 2018-08-24 14:59:01 +02:00
Alexander Holland
6d684aae8a text_edit auto_completion
replaced "similarity filter" with "sequential checks" this give more control over the desired filtering.
2018-08-14 22:45:10 +02:00
Rémi Verschelde
a3d0b89892
Merge pull request #20876 from ttencate/cursor_blink
Reset caret blink when Ctrl+moving the cursor
2018-08-14 15:42:19 +02:00
James
109028f52b Editor autocomplete: prefer same case candidates 2018-08-13 20:45:33 +02:00
Rémi Verschelde
9ce33978db
Merge pull request #20666 from Calinou/script-editor-underline-hidpi
Scale underlines in the script editor with the editor scale
2018-08-13 12:21:23 +02:00
Juan Linietsky
0fc1c4eda8
Merge pull request #20149 from Overblob/shader_float_typing
Shader language - Add optional float typings
2018-08-10 18:21:28 -03:00
Thomas ten Cate
44d761e55c 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
2018-08-10 11:23:13 +02:00
Hugo Locurcio
501fc98c63
Scale underlines in the script editor with the editor scale 2018-08-02 09:38:56 +02:00
Rémi Verschelde
7056dc6011
Merge pull request #20498 from Calinou/caret-width-hidpi
Make the caret thicker in TextEdit and scale it with the editor scale
2018-07-27 09:01:58 +02:00
Hugo Locurcio
f8a2cb3e15
Multiply TextEdit line spacing by the editor scale
This makes sure the default line spacing in the script editor
is consistent with the editor scale in use.
2018-07-26 23:50:16 +02:00
Hugo Locurcio
8d05f89bc1
Make the caret thicker in TextEdit and scale it with the editor scale
The caret in LineEdit is still 1 pixel thick, but it will become
2 pixels thick at editor scales higher than or equal to 150%.
2018-07-26 23:43:43 +02:00
Hein-Pieter van Braam
0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
Wilson E. Alvarez
a22e746bc3 Removed unnecessary assignments 2018-07-24 09:51:03 +02:00
George Marques
03746da73f
Add editor highlight for type-safe lines
The line number is hightlighted to indicate that the line contains only
type-safe code.
2018-07-20 21:55:18 -03:00
Overblob
e6ad5e23b4 * Small hex/float/integer parsing refactoring
* Potential bug fix on hex (cannot be used atm)
* Added optional typing for floats, eg:
"1f" -> "1.0"
"1.f" -> "1.0"
"1.99f" -> "1.99"
"1." -> "1.0"
2018-07-15 14:58:23 +02:00
Max Hilbrunner
16f1a77319
Merge pull request #19735 from Paulb23/text_offset_issue_15688
Fixed text drawing too high in TextEdit, issue 15688
2018-07-05 04:04:39 +02:00
Max Hilbrunner
e3c8ac43c6
Merge pull request #19187 from Zirak/editor-autocomplete-quote
Editor autocomplete won't insert unnecessary quotes
2018-07-05 02:33:33 +02:00
Max Hilbrunner
edc63a2f60
Merge pull request #18028 from gabrii/18026
Fix #18026. Expose TextEdit::set_draw_breakpoint_gutter.
2018-07-05 02:30:18 +02:00
Max Hilbrunner
fbff1804d2
Merge pull request #17438 from Deluvi/get-word-pos-quote-fix
get_word_at_pos considers simple and double quotes
2018-07-03 18:28:47 +02:00
Paulb23
8a168637fe Fixed text drawing too high in TextEdit, issue 15688 2018-06-24 10:38:53 +01:00
robojumper
4ba6755324 Re-enable scrolling via selecting code beyond edges in text_edit.cpp 2018-06-14 21:29:39 +02:00
Saracen
c5bdb5b1d8 IME context detection. 2018-06-11 17:22:11 +01:00
Max Hilbrunner
e949230837
Merge pull request #18298 from gabrii/TextEditScaledSelection
TextEdit scaled selection
2018-06-09 19:35:48 +02:00
Gabriel Gavilan
b7b63fe034 Improve breakpoints and breakpoint gutter API in TextEdit
Added breakpoint_gutter, is_breakpoint_gutter_enabled, set_breakpoint_gutter_enabled, get_breakpoints, remove_breakpoints.
Fixed breakpoint_toggled signal not fierd when text is edited.
Fixes #18026.
2018-05-30 14:39:44 +02:00
Zirak
c329780ea7 Editor autocomplete won't insert unnecessary quotes
When autocompleting a string (e.g. emit_signal or connect), e.g.

    emit_signal('visibility_c')
                            ^

where "^" is the cursor, hitting <tab> would insert an unnecessary
quote, breaking the string:

    emit_signal('visibility_changed'')

This commit adds a small lookahead, so the end result will be as the
user probably expected:

    emit_signal('visibility_changed')
2018-05-26 21:13:42 +00:00
Ibrahn Sahir
2abec59db9 fix for TextEdit::set_text firing signals it shouldn't.
Removing some _changed signals in set_ functions.
Includes revert of commit 384625aa31
2018-05-19 19:38:13 +01:00
Rémi Verschelde
d6c15bd96a
Merge pull request #19017 from toger5/fix_no_a_input_script_editor_osx
fixed capital A osx
2018-05-18 20:04:31 +02:00
toger5
6476b708d9 fixed capital A osx 2018-05-18 19:46:40 +02:00