Commit graph

454 commits

Author SHA1 Message Date
Robert Paciorek
44253e35e7 fix build for windows platform 2024-08-25 12:45:51 +00:00
Robert Paciorek
ca97b654ee rework _handle_selection()
* do not use timer for selection, due to issue with Engine.time_scale == 0
  * deciding on redraw based on target cell change
  * deciding on send to system based on mouse button up event
  * remove _on_selection_held() timer callback function and SelectionMode enum
* on non-Linux system use clipbord when copy_on_selection is active
2024-07-06 22:51:45 +00:00
Leroy Hopson
64aa0ff49a perf(term): merge custom theme with default theme
Merges a custom theme containing 'Terminal' theme properties with the
default theme rather than setting them on the default theme directly.

This improves performance for initial loading of the plugin.
2024-06-09 21:54:39 +12:00
Robert Paciorek
e830db667c fix socat_terminal example
* Godot 4.x seems to require call StreamPeerTCP.poll
* add missing signal connection (data from terminal to network)
2024-06-09 21:42:16 +12:00
Leroy Hopson
9569c9e489 perf(term): add benchmarks
Adds benchmarks by running [alacritty/vtebench](https://github.com/alacritty/vtebench)
benchmarks in the terminal.
Uses code based on [godotengine/godot-benchmarks](https://github.com/godotengine/godot-benchmarks)
to measure average GPU and CPU time spent per frame.
Uses [github-action-benchmark](https://github.com/benchmark-action/github-action-benchmark)
for continuous integration, and publishes benchmark results to https://lihop.github.io/godot-xterm/dev/bench/.
2024-06-09 21:21:30 +12:00
Leroy Hopson
8b33818751
fix(plugin): fix some errors and warnings 2024-05-19 12:14:04 +12:00
Leroy Hopson
608f27ba0c
fix(icon): use custom icons for Terminal and PTY 2024-05-19 11:42:27 +12:00
Leroy Hopson
98394bfbf5 chore: remove unused code 2024-05-10 22:50:39 +12:00
Leroy Hopson
7efd7218b0
chore(ci): change build and test to weekly 2024-05-10 22:30:29 +12:00
Leroy Hopson
d49f522802 feat(term): replace 'Copy All' menu item with 'Select All' 2024-05-10 22:16:45 +12:00
Leroy Hopson
892ed45159 fix(term): select() fixes
- Ensure selection is drawn.
- Allow deselection by mouse click.
- Respect copy_on_selection attribute.
2024-05-10 22:16:45 +12:00
Leroy Hopson
b29d809bc0 chore(term): remove unused code
Removes unused code from `terminal.gd`.
The status of `update_mode` is still unclear, so has been left for now.
2024-05-10 22:10:13 +12:00
Leroy Hopson
77b1481f8e feat(term): re-enable keyboard shortcuts
Closes #65.
2024-05-05 16:41:04 +12:00
Leroy Hopson
4c4e61cf99 feat(term): make cursor hollow when un-focused
Closes #29.
2024-04-28 23:26:02 +12:00
Leroy Hopson
c4c0f9c90a
chore(auto): automatic editor updates 2024-04-28 18:27:19 +12:00
Leroy Hopson
d6a4adf6aa
feat(terminal): and stylebox support
Adds support for 'normal' and 'focus' Style Boxes to Terminal node.
Changes default background color to transparent, with background to be
set by StyleBox.

If background color is not transparent, will draw a background color
rect to cover the entire control over the top of any stylebox. This is
consistent with the behavior of the TextEdit node with regards to theme
colors and styleboxes.
2024-04-28 18:09:21 +12:00
Leroy Hopson
a5951978f7
fix(pty): emit size_changed if forcing size update
Ensures that connected PTY is resized correctly on scene start.
2024-04-28 17:29:41 +12:00
Leroy Hopson
5c151c3244
feat(editor): make editor terminal functional 2024-04-28 17:29:40 +12:00
Leroy Hopson
ad2dc46414
feat(example): make terminal example functional 2024-04-28 17:29:40 +12:00
Leroy Hopson
e816396d60
feat(pty): add terminal_path property to pty
Property can be set to the NodePath of a Terminal node. Doing so will
conveniently set up the neccessary signals between Terminal and PTY for
them to function together.
2024-04-28 17:29:40 +12:00
Leroy Hopson
fa49834347
feat(theme): update themes 2024-04-28 17:29:40 +12:00
Leroy Hopson
886e6e82ac
fix(example): fix retro term shader 2024-04-28 17:29:40 +12:00
Leroy Hopson
90de3da45f
chore(just): add trailing '/' to test directory 2024-04-28 17:28:43 +12:00
Leroy Hopson
ee733ca45a
chore(deps): add godot editor debugger plugin 2024-04-28 17:28:43 +12:00
Leroy Hopson
dd118d72f3 feat(term): add select method
Adds select() method to Terminal. Method behaves the same way as
TextEdit's select method.
2024-04-28 17:22:26 +12:00
Leroy Hopson
43303a51bf fix(term): copy_selection() when nothing selected
Fixes the copy_selection() method so that it returns and empty string
when called and nothing is selected. Previously printed an error.
2024-04-28 17:22:26 +12:00
Leroy Hopson
3ca272c615
feat(test): add visual regression testing
Will upload screenshots on failure.
2024-04-07 00:45:49 +13:00
Leroy Hopson
898d49e392
fix(theme): fix regular font resource 2024-04-06 23:56:01 +13:00
Leroy Hopson
4bd25bb92c feat(theme)!: set a default theme
Adds 'Terminal' type to the default theme. Sets values to those similar
to CodeEdit and TextEdit. Colors default to Xterm defaults.
2024-04-01 21:26:24 +13:00
Leroy Hopson
e732712b55 feat(theme)!: replace hack with jetbrains mono
Replaces the Hack font with JetBrains Mono which is the new default code
editor font in Godot 4.
2024-04-01 21:18:00 +13:00
Leroy Hopson
6384f41837
chore: update license info 2024-04-01 19:42:22 +13:00
Leroy Hopson
6c8be30e7f
fix(pty): initialize exit_code to 0
Uninitialized exit_code variable was causing tests to fail on x86_32
arch due to returning an arbitrary int where 0 was expected.
2024-04-01 10:12:16 +13:00
Leroy Hopson
9f7e00f6a4
fix(ci): remove run_attempt from build name
By including run_attempt in build name, workflows could fail if only
re-running failed jobs.
2024-04-01 10:02:16 +13:00
Leroy Hopson
5232d24e6f
fix(ci): wait for linux binaries when exporting to web
Ensures we have both the linux and wasm binaries when exporting to web.
The linux binaries are required as the host system uses linux and will
fail to identify the GDExtension node types (PTY, Terminal) leading to
the export not including them.

Also removes the retry action as the initial export command was not
returning an error exit code anyway.
2024-04-01 09:36:10 +13:00
Leroy Hopson
ff95b60a56 feat(web): re-enable web exports 2024-03-30 22:52:39 +13:00
Leroy Hopson
fcad5d64b9
fix: use correct bits
Turns out the 32bit tests were actually using 64bit Godot and testing
the 64bit binaries.

This commit ensures that the tests use the correct builds and adds
32bit linux to the gdextension file.
2024-03-30 20:49:15 +13:00
Leroy Hopson
7778d68578
fix(ci): add run number and attempt to job name
Ensures that 'wait-for-check' will wait for builds of the same run
regardless of if there have been successful builds for other runs of the
same comit (e.g. when changes are menged in to main causing the branch
to be fast-forward and hence running CI for the same commit).
2024-03-30 20:29:42 +13:00
Leroy Hopson
5c6bcc45e3
Revert "fix(ci): make tests need builds to complete"
This reverts commit f9f055f08e.
2024-03-30 15:49:55 +13:00
Leroy Hopson
4afa6f770b
chore(bot): update dependabot pr labels 2024-03-30 02:59:20 +13:00
dependabot[bot]
e37062da18 chore(deps): bump mymindstorm/setup-emsdk from 11 to 14
Bumps [mymindstorm/setup-emsdk](https://github.com/mymindstorm/setup-emsdk) from 11 to 14.
- [Release notes](https://github.com/mymindstorm/setup-emsdk/releases)
- [Commits](https://github.com/mymindstorm/setup-emsdk/compare/v11...v14)

---
updated-dependencies:
- dependency-name: mymindstorm/setup-emsdk
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-30 02:52:24 +13:00
Leroy Hopson
f9f055f08e
fix(ci): make tests need builds to complete
The wait for action is not reliable, so tests are running before builds
have completed. By adding the explicit needs, tests will run at the
right time, but it will make workflow runs a bit slower.
2024-03-30 02:32:23 +13:00
Leroy Hopson
cf0b43f19d
chore(license): update license text
Updates year range and simplifies copyright text.
2024-03-30 02:26:31 +13:00
Leroy Hopson
a1a129cb68
chore(docs): update godot version badge 2024-03-30 02:25:37 +13:00
Leroy Hopson
e6e867d9cd docs: add message about inaccuracy of current documentation
A number of changes have been made to the build process which are not
documented. This commit adds a message to the documentation about this.
2024-03-30 02:19:56 +13:00
Leroy Hopson
d7c83b3fe9
chore(tidyup): remove old unused code
This code was left around for reference during development, but is no
longer used or needed.
2024-03-30 02:19:01 +13:00
dependabot[bot]
c4f0afc4f2 chore(deps): bump fountainhead/action-wait-for-check from 1.1.0 to 1.2.0
Bumps [fountainhead/action-wait-for-check](https://github.com/fountainhead/action-wait-for-check) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/fountainhead/action-wait-for-check/releases)
- [Commits](https://github.com/fountainhead/action-wait-for-check/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: fountainhead/action-wait-for-check
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-30 02:06:09 +13:00
dependabot[bot]
51e7fa651c chore(deps): bump actions/cache from 3 to 4
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-30 02:05:54 +13:00
Leroy Hopson
79848327d6
chore(import): don't import documentation files 2024-03-30 01:37:54 +13:00
Leroy Hopson
5cd298c124
chore(imports): automatic editor import updates 2024-03-30 01:36:15 +13:00
Leroy Hopson
1d2898f6ab
chore(spelling): add codespell pre-commit hook
Fixes spelling mistakes identified by it.
2024-03-30 01:27:28 +13:00