Commit graph

123 commits

Author SHA1 Message Date
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
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
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
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
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
ianb96
ce434bca82 fix get_char_width for non-latin characters 2018-05-15 15:32:09 -04:00
Ian
e1fff4bc09 TextEdit word wrap 2018-05-14 16:17:48 -04:00
Unknown
4e26e5e268 Script Editor now displays positional column
This solves #17931 and makes the script editor consistent with other text editors(Sublime, Gedit, Vim) in displaying the position rather than the raw number of characters.
2018-05-03 18:03:20 +01:00
Paulb23
b571a29df5 Fixed color regions and added local color region cache 2018-04-07 14:14:19 +01:00
Paulb23
f7c727e6c3 Abstracted the syntax highlighter from text edit 2018-04-02 12:41:44 +01:00
Rémi Verschelde
2551db44e1
Merge pull request #15618 from ianb96/fold_comment
TextEdit folding over unindented comments
2018-02-14 16:36:42 +01:00
Juan Linietsky
419705db6e Add special coloring to members, to make shadowing more obvious. 2018-01-12 11:01:09 -03:00
Ian
d327f75392 TextEdit folding over unindented comments 2018-01-12 00:25:04 -05: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
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
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
b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Bernhard Liebl
076a5f35fc Fix shift-key down on last line in TextEdit 2017-12-26 08:32:30 +01: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
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
MattUV
e669ca2576 Modify shortcuts and menus to fold/unfold code
Fix #13180
As the same shortcut cannot be assigned to two actions, I removed the ability to fold (fold_line()) or unfold (unfold_line()) via menu (still possible by code), and there is a single fold/unfold action (toggle_fold_line()).

The new default shortcut is now Alt+F
2017-12-08 19:21:48 +01:00
Paulb23
48ad133cf9 Changed current line draw order and added code folding color 2017-12-07 19:17:43 +00:00
Rémi Verschelde
8a07cb0b69
Merge pull request #14352 from ianb96/get_hidden_width
Fixes horizontal scrolling over hidden lines
2017-12-07 07:52:01 +01:00
Rémi Verschelde
46ac939a74
Merge pull request #13362 from groud/fix_folding
Fixes folding of blank lines
2017-12-07 07:20:41 +01:00
Ian
1c1a6723d0 fixes horizontal scrolling over hidden lines 2017-12-06 19:04:47 -05:00
Michael Alexsander Silva Dias
2773c12156 Add disabled theme to TextEdit. 2017-12-01 01:32:26 -02:00
Gilles Roudiere
e13ff74c09 Fixes folding of blank lines 2017-11-28 20:03:46 +09:00
Bernhard Liebl
80ad8afc85 Native pan and zoom for macOS 2017-11-21 09:11:39 +01:00
Ian
1e59169d2d scrolling fixes 2017-11-18 20:07:53 -05:00
Ian
d350f506a0 TextEdit code folding 2017-11-17 21:49:43 -05:00
Rémi Verschelde
4685674389
Merge pull request #12842 from ianb96/shader_editor_fix
Shader Editor context menu and line operations and style fix
2017-11-14 07:33:04 +01:00
Michael Alexsander Silva Dias
920f3f6546 Added "is_readonly()" to TextEdit and made it a property. 2017-11-11 22:14:14 -02:00
Ian
94b3e786cd shader editor context menu and line operations and style fix 2017-11-11 14:46:59 -05:00
Ian
fc299b4f37 add context menu enable getters, setters, and properties in LineEdit and TextEdit 2017-11-11 03:30:59 -05:00
Paulb23
6f6afde0c5 Changed line and word mouse selection 2017-11-05 15:54:00 +00:00
Paulb23
45670df354 Added setting to toggle current line highlighting 2017-10-22 13:42:08 +01:00
toger5
d58a159e38 keep font color on selection as default 2017-09-28 14:17:14 +02:00
Paulo Gomes
9b72f08042 second take at autocomplete logic, using a TextOperation check. 2017-09-06 19:23:09 +01:00
Rémi Verschelde
bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Juan Linietsky
36e0a72c77 -Code completion for enumerations
-Disabled GDNative and GDNativeScript so build compiles again
2017-08-24 00:06:56 -03:00
Paulb23
24c6c097f3 Stops scrolling when the user issues another command 2017-08-22 20:04:19 +01:00
Juan Linietsky
2cc8309249 Merge pull request #10351 from neikeq/enums-are-for-the-weak
ClassDB: Provide the enum name of integer constants
2017-08-21 19:56:08 -03:00
Paulb23
d6599fde0a Increased smooth scroll speed and added user setting 2017-08-21 19:20:11 +01:00
Ignacio Etcheverry
32dd9a9f66 ClassDB: Provide the enum name of integer constants 2017-08-20 22:07:43 +02:00
Paulb23
a142c9a2f0 Added smooth scrolling to TextEdit 2017-08-19 15:23:45 +01:00
TwistedTwigleg
00f6c85928 Synchronize parameter names in definition and declaration
Fixes #10244.
2017-08-16 17:22:23 +02:00
bruvzg
8aa86cb9bc Implement NSTextInputClient protocol for IME 2017-08-09 19:09:33 +03:00
Juan Linietsky
5b3709d309 Removal of InputEvent as built-in Variant type..
this might cause bugs I haven't found yet..
2017-05-20 17:05:38 -03:00