Commit Graph

494 Commits

Author SHA1 Message Date
stk 622b6c2aa7 Enable focus reporting only for terminals that support it
We assume that any terminal that supports mouse reporting will also support
focus reporting; but we also add an entry to Terminfo to let specific terminals
override it if needed.
2023-08-14 17:07:05 -07:00
stk 85dc29bf8a Implement focus events 2023-08-14 17:07:05 -07:00
Matthew Roseman a92c043b0b simplified bitwise math to determine if mouse scrolling 2023-08-14 17:05:00 -07:00
Matthew Roseman b9a2bbda10 don't record buttondn on scroll events 2023-08-14 17:05:00 -07:00
dependabot[bot] c14349d151 Bump codecov/codecov-action from 3.1.1 to 3.1.4
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.1 to 3.1.4.
- [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.1...v3.1.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 17:04:44 -07:00
delthas 709868d93d Support Xterm modifier keys for dynamic terminfos
Previously, modified function keys in dyanmic terminals were not
supported (like shift/control/alt + arrow keys).

Even though xterm-compatible terminals were dynamically discovered
and their keys added to the terminfo struct, the Modifiers field
was not supported and therefore the modified Xterm keys were not
added to the keycodes map (prepareXtermModifiers was skipped).

This fixes the issue by setting the Modifiers field when we
discover that the terminal is xterm-compatible.
2023-08-14 17:04:00 -07:00
bjorndm 14bc04d6bb Fix underlines in Windows console mode.
The ENABLE_LVB_GRID_WORLDWIDE is neede to enable them.
2023-08-12 08:39:46 -07:00
dependabot[bot] 47ec3a7775 Bump actions/setup-go from 3 to 4
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v4)

---
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>
2023-03-26 21:31:20 -07:00
Mykola Andriievskyi 90c665ca31 Add a new examples repo based ot tcell to readme 2023-03-26 21:30:51 -07:00
Garrett D'Amore c951371181 minor style fixup 2023-02-20 21:39:19 -08:00
Garrett D'Amore 615b4b1821 fixes #589 unexpected character linux console 2023-02-20 21:30:37 -08:00
Garrett D'Amore 7fe9d5fa9b Webasm terminal fixes.
Reverse video, not reverse text.
Provide an XTERM equivalent default palette.
Reset colors should go to silver on black.
Black color 0 should be rendered properly.
2023-02-20 21:13:27 -08:00
Garrett D'Amore d78960c02d Color fixups. 2023-02-20 20:52:19 -08:00
Garrett D'Amore 5db823e7a8 Better colors for mouse demo (brighter). 2023-02-20 20:51:25 -08:00
Garrett D'Amore 7b5fe1f3ee Spelling. 2023-02-20 15:41:09 -08:00
Garrett D'Amore 729d178abc Choose better fonts for web terminal. 2023-02-20 15:21:04 -08:00
Ahoys123 fade40c650 added to README-wasm.md 2023-02-19 17:48:50 -04:00
Ahoys123 0851813f48 added js flag 2023-02-19 17:48:50 -04:00
Ahoys123 b96a7ed4dc removed js build flag in terms_static.go 2023-02-19 17:48:50 -04:00
Ahoys123 3532b9d94e removed js build flag in tscreen_stub.go 2023-02-19 17:48:50 -04:00
Ahoys123 edb6434493 created wscreen.go
updated readme
2023-02-19 17:48:50 -04:00
Ahoys123 497e90a4fe added copyright comment 2023-02-19 17:48:50 -04:00
Ahoys123 b86f5127ac added webfiles directory
updated README.md
organized functions into original order
2023-02-19 17:48:50 -04:00
Ahoys123 49cc9d21db added wasm support 2023-02-19 17:48:50 -04:00
dependabot[bot] 87f880c2d6 Bump golang.org/x/term from 0.3.0 to 0.5.0
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/golang/term/releases)
- [Commits](https://github.com/golang/term/compare/v0.3.0...v0.5.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>
2023-02-19 15:00:31 -04:00
dependabot[bot] 9fed4d21b9 Bump golang.org/x/sys from 0.3.0 to 0.5.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/compare/v0.3.0...v0.5.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>
2023-02-19 14:55:22 -04:00
dependabot[bot] fa56a2b43d Bump golang.org/x/text from 0.5.0 to 0.7.0
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.5.0 to 0.7.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.5.0...v0.7.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-19 14:51:56 -04:00
Garrett D'Amore 7f837ee12c Test on 1.18 (oldest supported Go version). 2023-02-19 10:18:54 -08:00
Ryooooooga 841591b5c9 fix(cell.go): fix wide char rendering 2023-02-19 14:08:08 -04:00
moson-mo 5e9dd83b52 Add alacritty-direct terminfo
Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-01-08 16:20:58 -08:00
Garrett D'Amore b6aa1999e2 Bump dependencies. 2022-12-31 14:06:25 -08:00
Garrett D'Amore 0fb7c000c5 Fix status badges (broken by shields.io) 2022-12-31 09:12:50 -08:00
Garrett D'Amore dc01b79c87 fixes #580 tcell custom tty on Windows will not work
Applications will need to supply a working TTY of course.
2022-12-30 15:43:36 -08:00
Garrett D'Amore 2f889d79bd Make RUNEWIDTH_EASTASIAN=0 the default.
fixes #578

Also, while here, create a look up table
for performance reasons.  This can be suppressed by a new
TCELL_MINIMIZE environment variable, if RAM is precious.

Tcell applications should work out of the box by default
for most users in East Asian locales now.
2022-12-30 15:34:58 -08:00
Garrett D'Amore a642547922 fixes #576 Intermittent screen flashes 2022-12-30 14:55:11 -08:00
Garrett D'Amore 44c298f729 Encoding package should initialize at import.
There is no reason to make callers execute Register().
Also, while here, let's add some test cases.
2022-12-30 13:30:58 -08:00
Garrett D'Amore 916a717ae8 Add example case for registering encodings.
fixes #583
2022-12-30 12:54:50 -08:00
Garrett D'Amore e6d83cf4c3 Import order fix. 2022-12-18 18:58:04 +00:00
Garrett D'Amore 85d85c15ba Minor comment fixups. 2022-12-17 09:16:24 -08:00
dependabot[bot] ce3f911d83 Bump golang.org/x/text from 0.4.0 to 0.5.0
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.4.0...v0.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-06 15:13:48 -08:00
Sergio de Mingo 68adf4676d update README with gbb repo link 2022-10-30 18:33:51 -07:00
Garrett D'Amore 960cacdea6 Fix language selectors. 2022-10-25 19:19:31 -07:00
Eric S. Raymond 3e6ca93679 Improve tutorial program to show how to catch and re-raise a panic.
Some other clarifications added as well.

Co-authored-by: Garrett D'Amore <garrett@damore.org>
2022-10-20 09:40:48 -07:00
Garrett D'Amore d3cbfcfb7a fixes #574 Mouse wheel events during click-drag misdelivered as button events 2022-10-18 18:13:50 -07:00
Tim Culverhouse ede1dd5ee6 hyperlinks: fix id escape format
Commit 43efca775e added support for url IDs within OSC8 escape
sequences, however the formatting of the param is incorrect.

Use `id=` instead of `id:`

Fixes: 43efca775e ("hyperlinks: add support for optional id parameter")
2022-10-17 15:40:06 -07:00
dependabot[bot] 3aa9ffce5d Bump golang.org/x/text from 0.3.7 to 0.4.0
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.7 to 0.4.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.7...v0.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-17 15:38:55 -07:00
Garrett D'Amore 7557ac2a6c fixes #564 Excessive Ram usage for colors in direct / Tc mode 2022-10-16 22:39:04 -07:00
Chris Bradbury 178ac4393a Enable paste support in `views.Application`
Pasting is not supported when using the `Application` view. This commit enables pasting support on an opt-in basis.

Fixes #552
2022-10-16 22:32:30 -07:00
Tim Culverhouse 43efca775e hyperlinks: add support for optional id parameter
OSC8 escape sequences allow for marking up hyperlinks in the terminal.
An optional `id` parameter is defined to allow applications to signal to
the terminal that (potentially) broken character sequences belong to the
same URL and should be treated as if they were connected.

Add support for optional id parameters, set by the application. Update
test case for ti.EnterUrl.

Fixes: https://github.com/gdamore/tcell/issues/568
Reference: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#hover-underlining-and-the-id-parameter
2022-10-16 22:31:33 -07:00
Tim Culverhouse dbd182b6da widgets: lock access to WidgetWatchers internal map
The WidgetWatchers struct is designed to be embedded into custom widgets
in order to satisfy the WidgetWatcher interface. The implementation uses
an internal map for storing EventHandlers, but does not lock access to
the access of the map within each method. A race condition can occur if
Watch, Unwatch, or any event is Posted from separate goroutines.

Lock access to the internal map. When posting an event, create a deep
copy of the map for iterating. This prevents potential deadlocks from a
widget calling Unwatch while handling an event.
2022-10-16 22:31:04 -07:00