Currently tests only run on X11.64 platform.
But other platforms can be supported with a bit of effort.
Remove default bell sound as it does not play nicely with CI environment
that does not have sound card.
Currently only works when building with debug target. On GitHub actions
target release results in linking errors. So disable PTY for release
builds.
Part of #25.
Temporary measure until we can resolve the issue where inactive tabs
would be closed when clicking on the area where the close button will
show when policy was CLOSE_BUTTON_SHOW_ACTIVE_ONLY.
Clearing the terminal removes all lines in the scrollback buffer except
for the most recent.
With sb_reset, the terminal will return the scrollback buffer to the
bottom when the user starts typing if they have previously scrolled up.
- Add TerminalSettings resource.
- Init/load terminal settings from terminal panel.
- Add terminal context menu (i.e. right-click PopupMenu).
- Add shortcut to open a new terminal Ctrl+Shift+T and make terminal panel
visible.
Draw the full background for wide characters as soon as they are
encountered. Don't draw any foreground or background if width is zero as
this means the previous character was wide.
Fixes#17
In order to use the gdnative library as an editor plugin it was
neccessary to set the `reloadable` property of the gdnlib file to false,
in order to prevent crashes when the godot editor window lost focus.
This may have consequences when recompiling the library.
See: https://docs.godotengine.org/en/3.3/classes/class_gdnativelibrary.html#class-gdnativelibrary-property-reloadable
Still crashes quite frequently and doesn't close child processes
properly.
Part of #43.
- Renamed LICENSE -> LICENSE.md as it contains markdown, and added
contact address.
- Adds THIRDPARTY_NOTICES.txt and THIRDPARTY_NOTICES_nopty.txt which
bundles licenses of all third-party components for versions of
GodotXterm compiled with and without PTY node support.
- Adds misc/gen_3rdparty_licenses.sh file to generate the above
mentioned text files.
- Seperated node_pty and tmux licenses.
- Updated libuv submodule to use version that contains additional license
information.
- Updated README to reflect these changes.
If disable_pty=yes then the PTY node and dependencies (LibuvUtils, Pipe)
will be excluded. On platforms where the PTY node is not supported (e.g.
HTML5), this will always be equivalent to `disable_pty=yes`.
Gut was freezing on some integration tests. It was also entering an
infinite loop after exiting (even after closing Godot and VSCode) which
caused a `godot.log` file in app_userdata to keep growing until my hard
drive was full.
Uses fork of node-pty native code for forking pseudoterminals.
Uses libuv pipe handle to communicate with the child process.
- Paves the way for cross-platform (Linux, macOS and Windows) support.
- Renames Pseudoterminal to PTY (which is much easier to type and spell :D).
- Better performance than the old Pseudoterminal node. Especially when
streaming large amounts of data such as running the `yes` command.
- Allows setting custom file, args, initial window size, cwd, env vars
(including important ones such as TERM and COLORTERM) and uid/gid
on Linux and macOS.
- Returns process exit code and terminating signal.
Fixes#41. But creates another issue where sometimes the yield will
resume after the terminal node has already been freed logging an error
to the console.
Also a few changes to where update is called it the gdnative terminal
code.
Also changed gdnative terminal to only accept strings.
This also means that we can load default fonts from it. Falling back to
the default Godot font if no theme is set and the default theme does not
exist.
Having an actual theme loaded also allows live font resizing.
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.