Commit graph

442 commits

Author SHA1 Message Date
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
Leroy Hopson
bc15d8950f
docs(rtd): move documentation to read the docs 2024-03-30 01:20:07 +13:00
Leroy Hopson
0bd0d39f41
feat(pty): add cols/rows methods and resize tests 2024-03-29 01:27:42 +13:00
Leroy Hopson
d00a31fb45
feat(term): implement clear() method
Clears all but the bottommost row of the terminal (including scrollback
buffer) and moves the bottommost row to the top.
2024-03-03 22:39:51 +13:00
Leroy Hopson
fc03595e29
fix(ci): fix additional gut test success condition
Was missing `grep -q`, also adds an additional check for when no tests
were run whatsoever.
2024-03-03 21:14:00 +13:00
Leroy Hopson
71df1e71bd
feat(term): implement copy_all()
Implements the copy_all() method which copies all text in the screen
including text in the scrollback buffer.

Includes a fix to an upstream bug in libtsm that resulted in double the
number of '\n' characters being copied for each row.
2024-03-03 21:04:42 +13:00
Leroy Hopson
8255d8b3ce
fix(ci): exclude godot-cpp and libtsm from cache
The godot-cpp and libtsm dependecies are built via the SConstruct file
and therefore can be handled by the SCons cache. By caching the
seperately, changes to the submodules were being overwritten.
2024-03-03 21:04:40 +13:00
Leroy Hopson
fa28b7d6c2
fix(term): remove selection mode enum from tests
The SelectionMode enum is only used internally, so it can be removed
from tests of the public interface.
2024-03-03 21:04:16 +13:00
Leroy Hopson
13cf5ba023
feat(term): implement copy_selection()
Implements the copy_selection() method, which returns the selected text.

Adds a copy_on_selection property. When this property is enabled, the
selected text will automatically be copied to the primary clipboard
(Linux X11/Wayland only).
2024-03-03 21:04:16 +13:00
Leroy Hopson
7f03761fb2
fix(pty): remove non-portable signal enums
Remove signal enum members which do not use portable numbers, and
therefore may be different on different operating systems.
2024-03-03 21:04:16 +13:00
Leroy Hopson
b78bdf3136
feat(pty): rename get_pts() -> get_pts_name() 2024-03-03 21:04:16 +13:00
Leroy Hopson
c6609ebae5
feat(compat): make compatible with godot v4.2+
Previously the plugin could only be used with v4.2.1. This commit
extends support support back to v4.2.0.
2024-03-03 21:04:10 +13:00
Leroy Hopson
1a5f0f96da
chore(test): update tests
Adds additional tests for the interface. Creates a new base test class
GodotXtermTest that adds some additional assert methods. Tests
inheriting from this should override the got_described_class() method.
Add instance of the described class named 'subject' will be created and
added to the scene tree before each test.
2024-03-03 15:41:30 +13:00