Commit Graph

80 Commits

Author SHA1 Message Date
Roman Shevchenko d1669c6ab8 tidy up 2019-03-16 14:39:17 +03:00
Roman Shevchenko 394bc54473 #205 smarter URL/URI parsing 2019-03-16 14:18:21 +03: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 4ec83c54a4
#217 rectangular select and copy (#241)
* #217 rectangular select and copy
2019-03-05 09:55:29 +03:00
rrrooommmaaa 1909c4c032
fixed Wrong cursor rendering position on fast new line input (#228)
* #225 ESC press doesn't work as expected under vi

* fix: BEL OSC terminator for Windows

* bug fix: correcte DA2 handling

* bug fix: #223 Wrong cursor rendering position on fast new line input
2019-02-20 17:03:12 +03:00
Menno Finlay-Smits 35193b7981 Gofmt (#216)
* Added Make targets for gofmt

- `make check-gofmt` will check for files that aren't gofmt compliant
- `make gofmt` will fix any gofmt error's in Aminal's source

Vendored files are ignored.

* Add gofmt check to TravisCI checks

* Fix gofmt errors
2019-02-14 16:45:53 +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 bc1b3f0dfd Buffer fix (#201)
* bug fix: Save/Restore Cursor mess + some refactoring

* typo fix
2019-02-11 20:26:44 +00:00
Max Risuhin 1ca1b7c246 Introduce TestMain to run gui tests in goroutine locked to main app thread; Call LockOSThread only once. (#199) 2019-02-06 08:58:31 +00:00
nikitar020 22a5e8063a Implement three selection modes: char, word, and line. Make selection work in the same way as in Putty. (#191) 2019-02-04 13:24:49 +00:00
rrrooommmaaa 0c7499bf7e Vttest 2 (#190)
* added Tab Stops support

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

* bug fix: cursor rendition in Origin Mode

* bug fix: SGR parameters handling

* Save/Restore Cursor updates. Partial charset implementation.
2019-02-01 17:03:41 +00:00
nikitar020 9190afef8a Fix issue: sometimes it cuts selected text when copying to clipboard (#186) 2019-01-30 15:43: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
nikitar020 97fe7362ce
Add "select with mouse to copy" / "right click to paste" functionality (#181) 2019-01-29 14:56:03 +00:00
rrrooommmaaa d2214b7915 added Tab Stops support (#175) 2019-01-27 11:56:23 +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
nikitar020 6f11a23e6a Fix memory leaking (#156) 2019-01-17 12:17:51 +00:00
Max Risuhin 84c0069785 Erase cell with default background colour (#137) 2019-01-10 18:58:03 +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 4b97358eb0
Fix newline at end of buffer issue (#122)
* Fix newline at end of buffer issue

* Fix newline at end of buffer issue
2019-01-04 13:47:28 +00:00
Liam Galvin 6931354579
Merge branch 'master' into vttest-changes 2019-01-04 13:13:50 +00:00
Liam Galvin 03fd345079 fix tabbing 2018-12-03 12:00:36 +00:00
Liam Galvin fd71169b63 fix resize 2018-12-03 09:02:06 +00:00
Liam Galvin 177e928b71 more efficient text rendering and streamlining of output handling 2018-12-01 22:09:20 +00:00
Liam Galvin 083f3dd458 bounds checking for vttest 2018-11-29 13:19:30 +00:00
Liam Galvin adbbf0f5cf gofmt everythign 2018-11-29 13:04:47 +00:00
Liam Galvin 087907d323 fix selections 2018-11-27 10:15:16 +00:00
Liam Galvin 414d23ccb1 Add support for CSI ICH (@) 2018-11-24 21:56:48 +00:00
Liam Galvin 1371ace95c Adding missing DL CIS handler 2018-11-15 11:33:35 +00:00
Liam Galvin df5aa7fbe7 wrapping problems 2018-11-12 09:44:53 +00:00
Liam Galvin 13246ca931 gofmt 2018-11-11 12:58:05 +00:00
Liam Galvin 1d82f48f8b
Merge pull request #55 from liamg/ctrl-codes
add more control codes
2018-11-04 20:59:34 +00:00
Liam Galvin f24551e111 add more control codes 2018-11-04 20:58:28 +00:00
Liam Galvin a0843f3e52 fix conflict 2018-11-04 20:33:38 +00:00
Liam Galvin c7ef0874aa debug mode 2018-11-04 20:31:32 +00:00
Liam Galvin de3f07897f fix apt scrollbars 2018-11-04 18:58:12 +00:00
Liam Galvin 25802bc97a fix tabs 2018-10-26 09:52:49 +01:00
Liam Galvin a761595ce3 Add tabbing support 2018-10-26 09:46:43 +01:00
Liam Galvin 2f22c41828 fix osx framebuffer issues 2018-10-25 10:15:54 +01:00
Liam Galvin e68540ca3c added url detection and clicking 2018-10-24 16:28:49 +01:00
Liam Galvin 6df9ad1cf3 text selection and copy/paste 2018-10-24 12:15:43 +01:00
Liam Galvin 084c3671ce fixed failing test for resize 2018-10-24 10:24:52 +01:00
Liam Galvin 9c497deb3e improved vertical resize calcs 2018-10-24 10:07:10 +01:00
Liam Galvin 4a8a2226e7 fix vim bug and dodgy deletes 2018-10-23 17:13:58 +01:00
Liam Galvin bd4dcb1fe4 tidy up main package 2018-10-23 15:31:47 +01:00