Commit Graph

59 Commits

Author SHA1 Message Date
Roman Shevchenko 21ae93aa96 #116 URXVT extended mouse mode support 2019-03-17 12:41:41 +03:00
nikitar020 05c45c0892 Implement window manipulation CSI sequences (#256)
* Implement window manipulation CSI sequences

* Fix travis config to make gofmt only for go1.11 builds

* remove commented out functions
2019-03-13 14:16:32 +02:00
Menno Finlay-Smits 44233f384e Fix merge issues in develop (#257)
* Fix merge issues in develop

* Add -timeout to go test

The tests are timing out on TravisCI for some reason so a timeout has
been added so that `go test` will dump out the goroutine stack traces
when the tests are stuck.

* gui.Close now wakes up main loop

Without this, otherwise successful tests in main_test.go hang.

* Use a longer timeout in case CI infrastructure is slow

* Fix various gofmt issues

Not sure how some of these crept in.
2019-03-12 09:46:59 +03:00
Menno Finlay-Smits 8f183ba440 Avoid polling in main GUI loop (#245)
Instead of waking up regularly WaitEventsTimeout, WaitEvents and
PostEmptyEvent are used to make the main loop purely event driven. The
rate of redraws due to terminal activity can be tweaked via the new
wakePeriod const.

This leads to some significant performance improvements: Aminal now consumes:
- no CPU when idle (previously ~2.7% on my laptop)
- ~8.5% CPU on my machine when running htop full screen on a large
  monitor (previously ~18.5% on my laptop)
- scrolling large amounts of output is an order of magnitude faster

This change also incidentally fixes data races around the terminal
dirty flag (which is now gone).
2019-03-11 22:57:41 +02:00
rrrooommmaaa f207ec0930 #195 Real buffer clearing (#246)
* #195 Real buffer clearing. Step 1

* #195 buffer clear. Clearing Windows buffer
2019-03-07 12:22:57 +02:00
rrrooommmaaa 7ac6c801e2 fix data races (#230) (#235)
* fix data races (#230)

* Update CODEOWNERS
2019-03-07 11:15:48 +02:00
rrrooommmaaa 86627135dd #180/#234: CSI SM/RM multiple modes, Mouse button-tracking (#233)
* #180: added support for several modes specification in CSI SM/RM

* added Button Mouse Mode and SGR encoding
2019-02-26 13:14:51 +00:00
rrrooommmaaa 77348c2188 implemented 'area scrolling' (#202)
* implemented 'area scrolling'

* bug fix: area scroll down boundary check

* bug fix: ReverseIndex activates scroll down correctly
2019-02-11 20:27:08 +00:00
rrrooommmaaa 23797d50f3 Vttest 2 (#187)
* added Tab Stops support

* added support for Screen Mode (DECSCNM) -- reverse colors

* bug fix: cursor rendition in Origin Mode
2019-01-30 15:42:55 +00:00
rrrooommmaaa 4e7b8b40e7 Vttest (#173)
* Correct handling of DeviceAttributes request

* added DECCOLM support

* added DECALN control sequence support

* added NEL support

* bug fix: Erase To Cursor should be inclusive

* added support for 'Origin Mode' (DECOM) -- top/bottom margins only

* vttest test 1 screen 3: margin tests fixes

* added support for intermediate controls inside CSI sequence

* added support for LNM (Line Feed/New Line Mode)

* removed obsolete 'intermediate' parameter

* window resize on programmatic CSI resize

* DECCOLM should clear screen on both set and reset

* bug fix in autowrap mode

* TestCursorMovement runs all test cases; screen template images updated

Signed-off-by: Max Risuhin <risuhin.max@gmail.com>

* bug fix: line mode messing with autowrap

* added ResetVerticalMargins() method

* IsAutoWrap(), IsNewLineMode()

* corrected DECALN

* fixed NEL to work in Line Feed mode

* tyding up: removed map of 1 element

* Terminal state moved out from buffer

* fix
2019-01-25 22:43:56 +00:00
nikitar020 3ea8a70874 Clear selection on "reset mode" sequence (#172) 2019-01-25 18:17:04 +00:00
rrrooommmaaa 9c60167ca8 Vttest (#162)
* Correct handling of DeviceAttributes request

* added DECCOLM support

* added DECALN control sequence support

* added NEL support

* bug fix: Erase To Cursor should be inclusive

* added support for 'Origin Mode' (DECOM) -- top/bottom margins only

* vttest test 1 screen 3: margin tests fixes

* added support for intermediate controls inside CSI sequence

* added support for LNM (Line Feed/New Line Mode)

* removed obsolete 'intermediate' parameter

* window resize on programmatic CSI resize

* DECCOLM should clear screen on both set and reset

* bug fix in autowrap mode

* TestCursorMovement runs all test cases; screen template images updated

Signed-off-by: Max Risuhin <risuhin.max@gmail.com>

* bug fix: line mode messing with autowrap

* added ResetVerticalMargins() method

* IsAutoWrap(), IsNewLineMode()

* corrected DECALN

* fixed NEL to work in Line Feed mode

* tyding up: removed map of 1 element
2019-01-24 13:03:47 +00:00
Max Risuhin 16ea4133cb Run and validate vttest on Travis (#159)
* Run vttest on Travis to validate active buffer data and screenshot.

Signed-off-by: Max Risuhin <risuhin.max@gmail.com>

* Add deps sources to vendor

Signed-off-by: Max Risuhin <risuhin.max@gmail.com>
2019-01-21 18:48:46 +00:00
Max Risuhin a8ed9d472e Windows support and enhancements. (#123)
*  Windows support and enhancements.

 - Added basic platform abstraction layer for Pty and Process creation;
 - Added "platform" package that exposes a few interfaces and provides implementations for different platforms;
 - Windows build and dev env setup instructions;
 - Setup Travis and deploy git tags to GItHub releases;
 - Window scaling awares of monitor's dpi;
 - Resolved memory leaks on window resizing;
 - Default limit for terminal's buffer length.

Co-authored-by: nikitar020 <nikitar020@mail.ru>
Co-authored-by: Max Risuhin <risuhin.max@gmail.com>
Co-authored-by: Roman Shevchenko <rrrooommmaaa@mail.ru>

* ReadMe updated with Windows support; Detecting of currently used monitor.
2019-01-07 12:00:08 +00:00
Liam Galvin 177e928b71 more efficient text rendering and streamlining of output handling 2018-12-01 22:09:20 +00:00
Liam Galvin 11489256ab fix issue with apt loading bars 2018-11-12 10:15:14 +00:00
Liam Galvin c7ef0874aa debug mode 2018-11-04 20:31:32 +00:00
Liam Galvin 1c96cb83d5 add hinting 2018-10-29 20:35:49 +00:00
Liam Galvin 20c3c0cb14 sixel working 2018-10-27 22:06:26 +01:00
Liam Galvin 6df9ad1cf3 text selection and copy/paste 2018-10-24 12:15:43 +01:00
Liam Galvin 4a8a2226e7 fix vim bug and dodgy deletes 2018-10-23 17:13:58 +01:00
Liam Galvin 88b26ce91a add bracketed paste mode support 2018-10-23 15:10:58 +01:00
Liam Galvin cf2aef96e4 rename 2018-10-21 15:11:10 +01:00
Mikkel Oscar Lyderik Larsen 58d9b4a435
Change import to github.com
Changes the import from `gitlab.com` to `github.com`.

Without this Go gets confused.

```
main.go:13:2: cannot find package "gitlab.com/liamg/raft/config" in any of:
	/home/moscar/projects/go/src/github.com/liamg/raft/vendor/gitlab.com/liamg/raft/config (vendor tree)
	/usr/lib/go/src/gitlab.com/liamg/raft/config (from $GOROOT)
	/home/moscar/projects/go/src/gitlab.com/liamg/raft/config (from $GOPATH)
main.go:14:2: cannot find package "gitlab.com/liamg/raft/gui" in any of:
	/home/moscar/projects/go/src/github.com/liamg/raft/vendor/gitlab.com/liamg/raft/gui (vendor tree)
	/usr/lib/go/src/gitlab.com/liamg/raft/gui (from $GOROOT)
	/home/moscar/projects/go/src/gitlab.com/liamg/raft/gui (from $GOPATH)
main.go:15:2: cannot find package "gitlab.com/liamg/raft/terminal" in any of:
	/home/moscar/projects/go/src/github.com/liamg/raft/vendor/gitlab.com/liamg/raft/terminal (vendor tree)
	/usr/lib/go/src/gitlab.com/liamg/raft/terminal (from $GOROOT)
	/home/moscar/projects/go/src/gitlab.com/liamg/raft/terminal (from $GOPATH)
```

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2018-10-20 18:49:01 +02:00
Liam Galvin 8e5a9fb26d start scrolling 2018-09-02 20:59:35 +01:00
Liam Galvin 450f9f01bc better rendering 2018-09-02 15:13:33 +01:00
Liam Galvin 88528fc6b0 efficiency, introduced resize bug though :/ 2018-08-24 17:32:08 +01:00
Liam Galvin bb38d22a60 better input handling 2018-08-14 17:44:25 +01:00
Liam Galvin 76d846bcfe slomo toggle 2018-08-13 09:35:32 +01:00
Liam Galvin 7c7a7e2bc7 mouse modes 2018-08-12 20:06:48 +01:00
Liam Galvin 6d10ffd17c alt buffer 2018-08-12 15:16:26 +01:00
Liam Galvin 06526f4beb scrollback buffer 2018-08-10 13:46:35 +01:00
Liam Galvin 844ac645ce more codes 2018-08-09 21:32:22 +01:00
Liam Galvin 8f1efd822e nice colour scheme by default 2018-08-09 15:29:27 +01:00
Liam Galvin 5e2c2ca690 things 2018-08-09 13:30:16 +01:00
Liam Galvin 5889d744f9 tidy up config 2018-08-09 08:37:19 +01:00
Liam Galvin c6dbfc59c7 asdasd 2018-08-08 21:19:59 +01:00
Liam Galvin 11b4a2e487 buffer is getting pretty solid 2018-08-08 13:27:12 +01:00
Liam Galvin d5f5cf8592 lots more progress 2018-08-07 17:58:55 +01:00
Liam Galvin e54e0e2182 more rendering code 2018-08-07 12:19:25 +01:00
Liam Galvin 79be2cf8cb bleurgh 2018-08-06 17:53:27 +01:00
Liam Galvin a357df65b4 todying 2018-08-04 12:19:31 +01:00
Liam Galvin 43eaece5ca top working 2018-07-05 09:31:07 +01:00
Liam Galvin 73fd6ba00b top working 2018-07-05 09:29:01 +01:00
Liam Galvin 702811507e fixed top 2018-07-04 22:31:52 +01:00
Liam Galvin 006e6d53ea more scape codes 2018-07-04 17:39:50 +01:00
Liam Galvin 5ae70eeedc improve render efficiency 2018-07-03 17:40:18 +01:00
Liam Galvin 6fbcc3003e fixed resize issues at last 2018-07-03 16:53:36 +01:00
Liam Galvin af62fef8d5 extra demo tests, more key handling 2018-07-03 14:41:27 +01:00
Liam Galvin d3e7784b4d fix stuff 2018-07-02 22:17:12 +01:00