In certain situations it is possible that in a `Viewport` the same
mouse button is pressed twice in series without releasing it in
between.
In this case, focus stealing should happen to ensure, that the
mouse button is not sent unintentionally to the previously focused
Control node.
When using the script editor, if the keywords #region and #endregion where
in a string and ate the start of the line, the editor would not ignore them
and count them as the actual keywords, which when folded, would only fold
until the first #endregion in a string, for example.
By checking if these keywords were in a string, this commit now ensures the
editor ignores strings and fold the section correctly.
Fixes#89115.
This keyboard shortcut has been made with inspiration from the VS Code keyboard shortcut editor.action.copyLinesDownAction. It duplicates all selected lines and inserts them below no matter where the caret is within the line.
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>
Now the editor won't add indentation when pressing enter, is
declaring typed variables and there is a colon in the comment
example:
var a:=0#:[press enter]
no indentation
* All core types masks are now correctly marked as bitfields.
* The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks.
* Most bitmask operations replaced by functions in BitField<>
* Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is.
* Documentation and API dump updated to reflect bitfields in core types.
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".
Update TextEdit gutters subcase, gutter add and remove to ensure gutter total width is correct
Fix test_code_edit symbol lookup test case to include padding (+2)
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
The new default project theme uses StyleBoxFlat extensively for
a more modern design and better scalability to multiple resolutions.
SVG icons are now used in place of PNG icons. While this does not
allow for true vector-based icon drawing (icons are still rasterized
at load-time), this makes the design work easier for contributors
and opens the door to vector drawing in the future (e.g. with polygons
or SDFs).
Like for editor icons, the SVG header file is now built automatically
when a SVG file is changed. This removing the need for running
`make_header.py` manually (TODO).
The "Use Hidpi" project setting has been removed in favor of a
"Default Theme Scale" project setting, which allows creating the
default theme at a higher/lower scale than the default.
This can be used when designing GUIs with a high base resolution
to ensure crisp visuals.
Co-authored-by: Yuri Sizov <yuris@humnom.net>
Found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inh,inout,leapyear,lod,nd,numer,ois,ony,paket,ro,seeked,sinc,switchs,te,uint,varn,vew`