KEY_MASK_CMD is automatically replaced by KEY_MASK_CTRL on non-OSX
and KEY_MASK_META (Command key) on OSX, so it should be used for all
Ctrl/Cmd + key shortcuts.
Also de-hacked the macOS shortcut replacements with proper conditional
definition. Not tested on macOS, cannot judge if they are good shortcuts.
Fixes#10761.
Previously cloning down at the end of a script was broken if there was
not an additional empty line.
This fix ensures there is an empty line before attempting to clone
downwards.
Fixes#18206, cheers!
fix https://github.com/godotengine/godot/issues/16054
The clone_down shortcut that conflicts with the "editor / play" shortcut has been replaced by "SHIFT + COMMAND + C" instead of "COMMAND + B" on macOS
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.
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.
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.
Previously, the editor would attempt to set the scroll position to the
function's line number, but this would result in an invalid scroll
whenever functions above the target were folded.
This changes callback to use a combination of `goto_line` and
`set_edit_state` to navigate to the target line and reset the cursor to
column 0.
Using `goto_line` also has the side effect of automatically unfolding
the target function, which seems like useful behavior.
Fixes#14572.
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
Rename user facing methods and variables as well as the corresponding
C++ methods according to the folloming changes:
* pos -> position
* rot -> rotation
* loc -> location
C++ variables are left as is.
Added check to see if all lines in selection are commented (is_commented)
If so remove the comment from each line else add a comment.
If the line is empty, with trailing spaces or tabs, remove those.
This will add an extra comment character to the lines that are already commented,
so when you uncomment a block it retains the previous commented lines.
Following Zylann logic, if the selected lines are all commented out,
it removes one # from each. Otherwise, it adds one.
It works how it is, but i would like some feedback on how to implement this.