Commit Graph

329 Commits

Author SHA1 Message Date
Garrett D'Amore e15e96cbca Add banner in support of Ukraine. 2022-04-23 11:02:11 -07:00
Garrett D'Amore 80a58b9089 fixes #462 Console resizing
This supports both terminfo (Linux, macOS) terminals, and
the legacy Windows console.  Perversely, the "modern" Windows
terminal doesn't support application initiated resizing yet.
2022-04-23 09:50:07 -07:00
Garrett D'Amore 22d7226321 Show modifiers with mouse buttons in demo. 2022-04-16 20:27:20 -07:00
Garrett D'Amore e7b14a71dc fixes #300 Implement terminal hyperlinks
fixes #526 tcell emits redundant attributes

This work is inspired by, and partly derived from, work submitted by
Simon Ser (@emersion).  However, we've modified the bottom half of
the terminfo parser to better support strings properly, and are using
proper terminfo syntax.

Instead of an attribute called Hyperlink, we have called it Url
for the sake of brevity.

While here we noticed and fixed bug #526, which could badly impact slow
terminals, or slow links. This likely makes things better for folks
coming over long distance SSH connections for example.

We've also provided OSC 8 handling for all terminals which appear to
support the mouse sequences; hopefully ones that don't handle this
sensibly will just ignore it.  (Limited testing seems to show this.)
2022-04-16 10:57:21 -07:00
Garrett D'Amore cb7cb02d04 Include some explanatory text for the cursor demo. 2022-04-16 10:57:21 -07:00
Garrett D'Amore f631374ce3 Some minor language fixups. 2022-04-16 08:27:02 -07:00
Tobias Sjösten 6d3490a3ee
Fix doc typo (#525) 2022-04-16 08:22:12 -07:00
Will Daly 1510fff44d
Send AttrOff when clearing the screen (#523)
In tcell v2.4, the following calls would reset the screen
to its default color:

1. SetContent() to change the bg color to maroon.
2. Clear()
3. Show()

In tcell v2.5, the behavior changed to clear the screen
to the last-used style passed to SetContent.

This happens because commit 62f5502f set the dirty flag
to false for all cells, on the assumption that sending
ti.Clear would clear the cells anyway. Unlike the drawCell
calls triggered by the dirty flag, however, clearScreen
does not send AttrOff. This causes the screen to clear
to the last-used background color.
2022-04-16 07:58:36 -07:00
Garrett D'Amore 78490bdc53 fixes #509 style disappears 2022-04-03 11:40:07 -07:00
Garrett D'Amore d699c7e510 fixes #521 tmux-256color missing from bundled terminfo 2022-04-02 14:50:25 -07:00
Juan Maia 1f27c5e1ea
Upate golang.org/x/sys version to fix bug on darwin with go 1.18 (#520) 2022-04-02 14:43:57 -07:00
MATSUDA Takashi 2a1a1b5864
enhanced mouse tracking mode (1006) is set improperly when exiting tcell (#512) 2022-03-13 13:30:54 -07:00
dependabot[bot] fba1334b37
Bump actions/setup-go from 2.1.5 to 3 (#516)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2.1.5 to 3.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2.1.5...v3)

---
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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-13 13:28:47 -07:00
dependabot[bot] f94c6b2ed1
Bump actions/checkout from 2.4.0 to 3 (#517)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.
- [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/v2.4.0...v3)

---
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>
2022-03-13 13:28:25 -07:00
Garrett D'Amore 8b074c48d6 Add note for Russian people with respect to invasion of Ukraine. 2022-03-04 18:15:09 -08:00
anmitsu 0d961d2608
Add examples in README.md (#504) 2022-02-08 07:34:40 -08:00
Julian Li a4a91ffc1c
Add gosnakego to the list of examples in the README (#510) 2022-02-08 07:34:00 -08:00
dependabot[bot] 3260e4ac43
Bump actions/setup-go from 2.1.4 to 2.1.5 (#508)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2.1.4 to 2.1.5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2.1.4...v2.1.5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  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>
2021-12-27 13:20:15 -08:00
Daniel Eklöf 23382126c9
Add “foot-extra” as a terminfo alias for “foot” (#506)
There are two “regular”[^1] terminfos for foot. One stripped down
version included with ncurses, and another one shipped with foot
itself, that contains a number on non-standard capabilities (mainly
used by tmux).

Foot’s “own” terminfo is _usually_ packaged as “foot-extra”.

[^1]: there’s actually four; foot also has a “direct” variant (similar
to xterm-direct): foot-direct, and foot-extra-direct.
2021-12-14 06:41:17 -08:00
Garrett D'Amore a4c1216c52 Update golang.org/x/sys -- may fix #492. 2021-11-14 22:19:21 -08:00
dependabot[bot] e13756b889
Bump actions/checkout from 2.3.5 to 2.4.0 (#502)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.5 to 2.4.0.
- [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/v2.3.5...v2.4.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  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>
2021-11-14 21:46:18 -08:00
Garrett D'Amore 8fc0c2be8f Trivial README tweaks. 2021-10-26 22:47:09 -07:00
dependabot[bot] 1adacaa894
Bump actions/checkout from 2.3.4 to 2.3.5 (#497)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 2.3.5.
- [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/v2.3.4...v2.3.5)

---
updated-dependencies:
- dependency-name: actions/checkout
  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>
2021-10-18 13:30:55 -07:00
Garrett D'Amore 7a51dfdb92 Add some missing compat key codes. 2021-10-16 00:15:41 -07:00
Garrett D'Amore ca30a3ede1 rune should be zero 2021-10-15 23:54:34 -07:00
Garrett D'Amore f41740d38a termbox clients may depend on undocumented key value for runes 2021-10-15 23:46:24 -07:00
Garrett D'Amore 5eb15bb517 termbox missed the color refactoring memo 2021-10-15 23:21:48 -07:00
Antonio Lassandro c3ed795e59
Enable mouse support in views.Application (#494) 2021-10-10 22:41:26 -07:00
Garrett D'Amore 62f5502f7b
fixes #485 Optimize screen.Clear() (#491) 2021-10-10 22:40:26 -07:00
Garrett D'Amore 761abf6821 fixes #356 Vim cursors shapes?
This adds a new method, SetCursorStyle() to the screen API.
It also automatically restores the cursor when disengaging to
the default cursor.  Modern terminals (and Windows console) support
this.
2021-09-28 20:05:18 -07:00
Garrett D'Amore 8d48900cd2
fixes #489 Fix for #480 causes disengage to stall for another event (#490) 2021-09-27 07:30:29 -07:00
Adam Bozanich beb254a9ac
viewport: truncate size to area avaiable in parent (#153)
* viewport: truncate size to area avaiable in parent

* boxlayout: handle widget removal
2021-09-26 09:38:46 -07:00
ramachandrasuresh 66f061b1fc
patch for mouse events not working in putty (#477)
Co-authored-by: Suresh Ramachandra <suresh.ramachandra@intelerad.com>
2021-09-26 09:29:09 -07:00
dependabot[bot] b9b74429a8
Bump golang.org/x/text from 0.3.6 to 0.3.7 (#478)
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.6 to 0.3.7.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.6...v0.3.7)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  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>
2021-09-26 09:18:31 -07:00
Alexander Tumin 2f3199b286
Add NewTerminfoScreenFromTtyTerminfo to allow creating Screen using (#479)
custom terminfo as well as custom tty.
2021-09-26 09:17:45 -07:00
dependabot[bot] edd0f2f203
Bump actions/setup-go from 2.1.3 to 2.1.4 (#483)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2.1.3 to 2.1.4.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2.1.3...v2.1.4)

---
updated-dependencies:
- dependency-name: actions/setup-go
  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>
2021-09-26 09:15:51 -07:00
Spenser Black 634d607d68
Name return values for `Screen.Size` (#487)
This adds names to the return values of the Size function to add
context. This also changes the return declarations to use the shortcut
when both named return values are the same type, by only specifying the
type once.
2021-09-26 09:15:22 -07:00
Garrett D'Amore f057f0a857
fixes #480 EventError fired after suspended Screen resumes (#484) 2021-09-04 17:28:22 -07:00
Garrett D'Amore 4e564d2402 Modernize shields.
This references the GitHub workflows, and eliminates the goreportcard
which appears to be defunct now.
2021-09-03 21:47:58 -07:00
Kyle Prifogle 73703f7ed4
Adding some small tcell repos I threw together (#481) 2021-08-28 13:16:08 -07:00
dependabot[bot] 843fc86ebf
Bump github.com/mattn/go-runewidth from 0.0.10 to 0.0.13 (#474)
Bumps [github.com/mattn/go-runewidth](https://github.com/mattn/go-runewidth) from 0.0.10 to 0.0.13.
- [Release notes](https://github.com/mattn/go-runewidth/releases)
- [Commits](https://github.com/mattn/go-runewidth/compare/v0.0.10...v0.0.13)

---
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>
2021-07-29 07:50:20 -07:00
dependabot[bot] c54c4c65c2
Bump github.com/lucasb-eyer/go-colorful from 1.0.3 to 1.2.0 (#475)
Bumps [github.com/lucasb-eyer/go-colorful](https://github.com/lucasb-eyer/go-colorful) from 1.0.3 to 1.2.0.
- [Release notes](https://github.com/lucasb-eyer/go-colorful/releases)
- [Changelog](https://github.com/lucasb-eyer/go-colorful/blob/master/CHANGELOG.md)
- [Commits](https://github.com/lucasb-eyer/go-colorful/compare/v1.0.3...v1.2.0)

---
updated-dependencies:
- dependency-name: github.com/lucasb-eyer/go-colorful
  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>
2021-07-29 07:47:41 -07:00
dependabot[bot] 917282dd89
Bump golang.org/x/text from 0.3.0 to 0.3.6 (#476)
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.0 to 0.3.6.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.0...v0.3.6)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  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>
2021-07-29 07:46:31 -07:00
Matthieu MOREL f9a5280328
Set up Dependabot (#470)
* Create dependabot.yml

* Update dependabot.yml
2021-07-29 07:31:06 -07:00
Garrett D'Amore 0b75e1e09e Add new workflows. 2021-07-17 11:27:57 -07:00
Garrett D'Amore 5d53415eb8 Fix links to tslocum's packages. Add link to tutorial from readme. 2021-07-17 11:11:35 -07:00
Garrett D'Amore 0de353bdce Convert documentation to Markdown.
While asciidoc is probably technically more flexible, some sites
(such as pkg.go.dev) do not support it well.  For the basic docs
we have here, the extra richness from asciidoc is not needed, and
we would prefer not to sacrifice the broader support that MarkDown
enjoys.

While here the text was cleaned up, made consistent, with grammar
and spelling fixes.

The Tutorial was revised somewhat to provide more accurate guidance
for readers.
2021-07-17 11:04:43 -07:00
eNV25 b60a903b98
Add Screen.ChannelEvents v2 (#465) 2021-06-11 19:43:12 -07:00
Garrett D'Amore 7946eb8e8d Wait for output to drain.
Hopefully this fixes unpredicatable output when the program is stopping.
2021-06-10 07:33:55 -07:00
Garrett D'Amore 65821462b5 Close the tty device when finishing. 2021-06-10 06:55:56 -07:00