The sequences are:
CSI > Pp ; Pv m (e.g. '\e[>4;m'
CSI ? Pm $ p (e.g. '\e[?12$p'
These sequences were being output by vim and causing the underline
attribute to be set and the terminal to be reset.
Fixes#40
- Use viewport as render target for terminal:
Terminal now only draws cells which changed since the last _draw() call.
A viewport is used with clear mode set to NEVER to cache previous draw
calls. The terminal node and viewport are wrapped by a GDScript Terminal
node which takes care of resizing the viewport scene, and forcing the
terminal to redraw all cells when necessary (i.e. on resize or theme
change).
Adds update_mode to terminal interface which can be set to one of:
- DISABLED: terminal will never be drawn
- AUTO: terminal will only draw the cells that changed, but
automatically redraw the full screen when necessary (for example,
when the size or theme changed).
- ALL: terminal will always draw every cell on every update. This is
the most reliable but least performant option.
- ALL_NEXT_FRAME: Will use update_mode ALL for the next _draw() call,
then change update_mode back to AUTO.
- Upgraded libtsm:
Includes changes from Fredrik Wikstrom (salass00)'s fork of libtsm.
- Don't require theme to be set.
Terminal will use default fonts/colors if no theme is set.
When trying to load the library in a non-Mono Godot editor v3.3.2
an error is printed about godot_get_global_constants(). Furthermore,
the issue with using the GlobalConstants header to get constants is only
present on the javascript platform, so we can revert all other platforms
to the old way of getting constants.
In a freshly cloned repo, submodule directories exist but are not
empty. Check if they are empty and update submodules. Previously,
submodules where only updated if their directories did not exist.
Previously KeyList constants came from the GlobalConstants.hpp header,
but this did not work when compiling for HTML5. Therefore, we now get
the globals constants from the GDNative API.
Throws the error:
`LNK2019: unresolved external symbol godot_get_global_constants referenced in function "private: static void __cdecl godot::Terminal::_populate_key_list(void)" (?_populate_key_list@Terminal@godot@@CAXXZ)`
in GitHub Windows action. So use the old technique on Windows for now.
This is a prerequisite for HTML5 support.
Previously no arguments were provided, but by convention argv[0] should
be the name of the program.
Providing this argumens enables Psuedoterminal node to work on macOS.
- Uses matrix so that build steps don't need to be defined multiple
times.
- Caches godot-cpp bindings, so they only need to be built when the
submodule version changes.
- Uploads build artifacts for linux 32/64-bit, windows 64-bit and macOS
64-bit.
Move pre-built binary to 'dist' folder so it no longer causes git
conflicts with custom builds. Also make it a release build which
decreases its size by ~70M.
Former-commit-id: ea9954712062f6ab0f6af9a55d72f0324cd51e5f
This is important when terminal is a child of a Container node and we
set the margin properties, otherwise the background rect is drawn with
an offset.
Former-commit-id: e68d2f55c9
If a true color has been set it will have code -1 regardless of the
actual color. Therefore, it shouldn't be stored in the color cache
dictionary otherwise all true color cells will be colored the most
recently set value.
Former-commit-id: 0d14fd1e47
Most notably:
- Reflow is now working. Terminal size will fill the window and
cols/rows will be resized/calculated based on window and font size.
- Added support for different fonts (i.e. bold, italic, bolditalic).
- Enabled blinking characters.
- Adde more tests and caught a few subtle bugs.
- Removed renderer code (which was part of xterm.js) and just
doing naive rendering in terminal.gd, but it seems to perform
a lot faster.
Still not working completely:
- vim (some weirdness going on).
- vttest (more weirdness).
Todo:
- Fix the above.
- Draw the cursor!
- Improve performance. Performance is still not great. The terminal
becomes unusable when running `yes` or `cmatrix -r`.
With the exception of text_decoder.gd the code in these files follows
the original so closely that it doesn't qualify as an original work
and so there is nothing new to copyright.
Instead, the original license text is kept with a note mentioning the
port to GDScript.