1
0
mirror of https://github.com/gdamore/tcell.git synced 2025-04-24 13:48:51 +08:00

469 Commits

Author SHA1 Message Date
Garrett D'Amore
24d9487d4a Fix color values for named RGB colors. 2024-03-05 02:40:02 -08:00
Garrett D'Amore
9970579247 style test: better contrast colors 2024-03-05 01:00:52 -08:00
dependabot[bot]
2449fd30cc Bump golang.org/x/sys from 0.17.0 to 0.18.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.17.0 to 0.18.0.
- [Commits](https://github.com/golang/sys/compare/v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-05 00:27:54 -08:00
Garrett D'Amore
581a114039 Windows: hyperlink support 2024-03-05 00:25:29 -08:00
Garrett D'Amore
18256bb692 Windows build fix. 2024-03-05 00:11:19 -08:00
Garrett D'Amore
9bc5c636ae Underline API change.
The underline styles are mutually exclusive.  And let's simplify
passing the color with the underline style in a single function call.
2024-03-04 23:56:23 -08:00
Garrett D'Amore
826c271964 Colored underlines.
This supports UNIX and Windows.
2024-03-04 21:19:42 -08:00
Garrett D'Amore
ed7527708c Forgot to commit mkinfo.go 2024-03-04 19:59:29 -08:00
Garrett D'Amore
9a52dc2a4e terminals: move the import into tscreen_unix.go
(Rationale: we might want to use a *much* smaller database for
systems that have a fixed set of strings, such as xterm.js.)
2024-03-04 00:07:22 -08:00
Garrett D'Amore
ecac43f113 wasm: fix the blink by injecting a sub-span. 2024-03-03 19:13:22 -08:00
Garrett D'Amore
ef0ee53eee minor clean up for style demo 2024-03-03 19:06:42 -08:00
Garrett D'Amore
1fb8cfe768 feature: underline styles
This supports now curly, double, dashed, and dotted underline styles
where trhe terminal supports it.  This works well on Windows Terminal,
reasonably on iTerm2, Alacritty, Kitty, and probably others.

The wasm mode terminal includes support for this, dependent on the browser
capabilities.

The macOS Terminal just changes the background color.  Legacy Windows
console does nothing.

We will try to provide a regular underscore as a fallback.  A new style.go
demo is included to see some style combinations.
2024-03-03 19:04:45 -08:00
Aaron Riekenberg
edd4f70bdd Add go-tetris. 2024-03-03 15:23:46 -08:00
Garrett D'Amore
d1364d5937 windows: restore cursor location correctly v2.7.4 2024-03-03 15:19:20 -08:00
Garrett D'Amore
b02dac3826 fix stress demo (race on close) 2024-03-03 15:02:14 -08:00
Marcel Schramm
2c305c06d7 Add little stresser that just draws as much 'random' stuff as possible 2024-03-03 13:51:12 -08:00
Garrett D'Amore
de408507f9 terminfo: regenerate all entries
Previously we had lost StrikeThrough, and this fixes a few other
discrepancies.  This was generated on Ubuntu Noble (24.04), after
installing the following packages: ncurses-term kitty-terminfo
v2.7.3
2024-03-03 08:30:47 -08:00
Garrett D'Amore
6c95e8dbb3 Try not to clear screen on Windows if TCELL_ALTSCREEN=disable v2.7.2 2024-03-02 14:22:12 -08:00
Garrett D'Amore
6984e257e4 Allow use of TCELL_ALTSCREEN=disable to disable alternate screen.
This hack will also prevent the clearing of the screen at disengage
time.  This may be useful for certain kinds of applications that
want to draw the screen, then place the cursor at a specific location.
(The application will need to do a TGoto on it's own first.)
2024-03-02 14:18:52 -08:00
Garrett D'Amore
552bf3cec1 windows: Use alt screen by default (supress with TCELL_ALTSCREEN=disable)
The alternate screen buffer right now only works in VT mode.
2024-03-02 12:47:28 -08:00
Garrett D'Amore
5a591d4275 Use automargin disable 2024-03-02 12:02:40 -08:00
Garrett D'Amore
f6c43a3372 ConEmu fixes - we cannot go to 24-bit mode on that yet. 2024-03-02 11:55:11 -08:00
Garrett D'Amore
cd0fe984d9 Windows: enable VT mode output by default
The special environment variable TCELL_VTMODE may be set to "disable"
to return to legacy console mode.  (This environment variable may
be removed in the future, if we determine it is no longer useful.)
2024-03-02 11:31:16 -08:00
Garrett D'Amore
d17cf8bb6b fixes #621 Unicode disappears if requested twice on the same place on Windows v2.7.1 2024-02-17 10:49:06 -08:00
Garrett D'Amore
547b1102d3 fixes #669 Focus event support for Windows console 2024-02-17 10:28:53 -08:00
dependabot[bot]
a58de98116 Bump golang.org/x/term from 0.15.0 to 0.17.0
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.15.0 to 0.17.0.
- [Commits](https://github.com/golang/term/compare/v0.15.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-16 00:09:01 -08:00
dependabot[bot]
2833ff3aa0 Bump golang.org/x/sys from 0.15.0 to 0.17.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.15.0 to 0.17.0.
- [Commits](https://github.com/golang/sys/compare/v0.15.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-16 00:06:37 -08:00
dependabot[bot]
c4ecc72735 Bump codecov/codecov-action from 3.1.4 to 4.0.1
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.4 to 4.0.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3.1.4...v4.0.1)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-16 00:04:46 -08:00
dependabot[bot]
984d851637 Bump actions/setup-go from 4 to 5
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-15 23:59:50 -08:00
Garrett D'Amore
216e30afd7 fixes #679 Some emojis move entire line upwards when at bottom of terminal
This fix is not perfect, in that it will not fix every terminal that has
automargin support, but it fixes the *vast* majority of them by eliminating
the hacky workaround for the automargin - essentially using the rmam capability
to disable automatic wrapping at the margin.
2024-02-15 23:53:05 -08:00
Garrett D'Amore
5bdcc2579b Termite is dead/deprecated - drop it.
Fallback support will still work, but termite is no longer supported
and users of termite are advised to switch to Alacritty.
2024-02-15 23:51:10 -08:00
Garrett D'Amore
15a4f4f1fb fixes #677 PollEvent() returns nil when screen is suspended 2024-02-15 22:25:45 -08:00
Garrett D'Amore
b05ee8f998 remove stale comment 2024-02-15 22:11:18 -08:00
Garrett D'Amore
cc24c71d4b fixes #682 views/app uses deprecated PostEventWait 2024-02-15 22:02:11 -08:00
Garrett D'Amore
c3711de418 fixes #683 views: remove unused contentV member 2024-02-15 22:02:01 -08:00
Garrett D'Amore
0393f5eb0b Add security policy. 2024-01-20 17:19:54 -08:00
stk
96e2990564 Don't set modifiers for AltGr on Windows
AltGr is the same as ctrl+alt, and we don't want those to be set when you press
a key using AltGr.
2024-01-03 10:06:01 -08:00
Garrett D'Amore
337e381927 fixes #606 Want ColorNone to preserve existing color(s)
While here, consolidate the use of the Fill() function from
CellBuffer (eliminating redundant code).
v2.7.0
2023-12-08 00:19:52 -08:00
Garrett D'Amore
8041b8e7ac Refactor event polling code.
This centralizes much of the logic (hopefully reducing duplication)
for polling events and the queue.  This will make it easier to make
further design changes to express a better, simpler, API to consumers.

While here addressed missing logic to handle Fini correctly on Windows.
2023-12-07 22:55:17 -08:00
Garrett D'Amore
e3a99dde75 Add shebang 2023-12-05 14:29:12 -08:00
Garrett D'Amore
26f328fb89 simscreen: unbreak the API
The API for NewSimulationScreen() was changed, which turned out to
break 3rd party libraries and applications.  (We didn't forgot that
this is part of the public API for tcell.)
2023-12-05 14:21:05 -08:00
Garrett D'Amore
fb3659df9f refactoring: use common LockRegion implementation 2023-12-04 07:48:27 -08:00
Garrett D'Amore
92c4f488a6 mouse demo: fix crash when multiple buttons pressed together
If we cannot decode the buttons in a drag, we might try to use '*',
which would reuslt in a negative index in the theme table.  This
only affected the demo application itself.
2023-12-03 17:42:09 -08:00
Garrett D'Amore
d82c270755 More refactoring, common cell buffer 2023-12-03 17:36:26 -08:00
Garrett D'Amore
602a4730ac Update SimScreen with new refactoring 2023-12-03 17:08:48 -08:00
Garrett D'Amore
ef4f9ccd96 Start of base screen refactoring.
A lot of functionality is duplicated across screen implementations,
and adding convenience methods is onerous because one needs to touch
each implementation with what is mostly copy-paste coding.

This represents the start of refactoring to eliminate redundant code
from each implemenation and provide for it in a common layer.
2023-12-03 16:54:28 -08:00
dependabot[bot]
fe52739ee8
Bump github.com/mattn/go-runewidth from 0.0.14 to 0.0.15 (#632)
Bumps [github.com/mattn/go-runewidth](https://github.com/mattn/go-runewidth) from 0.0.14 to 0.0.15.
- [Commits](https://github.com/mattn/go-runewidth/compare/v0.0.14...v0.0.15)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-runewidth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-03 15:53:12 -08:00
dependabot[bot]
776ecfbd6a
Bump actions/checkout from 3 to 4 (#635)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-03 15:52:35 -08:00
dependabot[bot]
a94f73f8d9
Bump golang.org/x/term from 0.9.0 to 0.15.0 (#661)
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.9.0 to 0.15.0.
- [Commits](https://github.com/golang/term/compare/v0.9.0...v0.15.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-03 15:51:33 -08:00
dependabot[bot]
5ed7b912b0
Bump golang.org/x/sys from 0.11.0 to 0.15.0 (#660)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.11.0 to 0.15.0.
- [Commits](https://github.com/golang/sys/compare/v0.11.0...v0.15.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-03 15:45:16 -08:00