Commit Graph

35 Commits

Author SHA1 Message Date
John Hood 756f4f8e98 Remove "using namespace std;". 2018-08-15 19:27:23 -04:00
John Hood fb23168ed9 Always use std::min, std::max. 2018-08-15 19:26:27 -04:00
Kang.Jianbin 6cfa4aef59 Add true color support.
Implement true color support define in:
https://en.wikipedia.org/wiki/ANSI_escape_code

The sequence is:
ESC[ … 38;2;;; … m Select RGB foreground color
ESC[ … 48;2;;; … m Select RGB background color
2017-10-29 20:20:03 -04:00
John Hood 4835dcf5ee Various switch statement fixes. 2017-08-06 22:22:25 -04:00
John Hood 3346419724 Remove excessive parentheses
There are many more.
2017-08-06 22:22:20 -04:00
Alex Cornejo 4b240ac033 support osc 52 clipboard copy integration.
This feature is particularly relevant for mosh for chrome (which also
used in windows I believe).
2017-07-31 23:17:24 -04:00
Keith Winstein e7303e0b66 Eliminated "handled" field in Parser::Action
This field was used during development to measure the
coverage of the ANSI terminal parser against typical
terminal input sequences.

The "handled" field has not been read by any code since
commit 1ee54cd7 (February 2011). Eliminating the field
by popular request (closes #723).
2016-02-10 22:06:18 -08:00
John Hood 2ac3bbeb9b Fix prediction unicode bug. Make all Cell members private.
Fixes #702.
2015-12-24 22:27:17 -05:00
John Hood 1d71895ff4 Add support for back tab (CSI CBT), and forward tab (CSI CHT) too.
Resolves #539.
2015-12-06 22:38:19 -05:00
John Hood 32afa96111 Change Framebuffer's containers/methods to improve performance.
* Reduce the size of Terminal::Cell.
* Change colors and attributes in Terminal::Rendition to bitfields/bitmask.
* Change Cells to use UTF-8 strings instead of vector<wchar_t>.  Store Rows in a vector instead of a deque.
* Add various Framebuffer::append() methods for more efficient passing of single and repeated characters.
* Change title/icon strings from deques to a vector typedef-- this is more for tidiness than any real performance.
2015-12-06 17:42:34 -05:00
John Hood 8fdcdc88cd Isolated algorithmic improvements.
* Fix inefficient STL use around Parser::UTF8Parser.
* Reduce typeid() usage, change some of it to a virtual method
* Do multiple-line scrolls as a single move
2015-12-06 17:42:34 -05:00
John Hood 543f346ac7 Fix various new compiler warnings.
terminalfunctions.cc: set_if_available() was undeclared.
Fix printf() wint_t/wchar_t warnings.
mosh-server.cc: Fix warning for side effects inside typeid().

Signed-off-by: John Hood <cgull@glup.org>
2015-06-06 13:12:32 -04:00
John Hood 67c22e5065 issue #507: fix/simplify parsing of colors 2015-06-05 00:12:01 -04:00
Anders Kaseorg cd2ae36f36 Mark local functions as static
This helps to catch unused functions like the former mosh_read_line,
allows the compiler to make better inlining decisions, and reduces the
binary size a bit.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2015-06-04 23:52:03 -04:00
Louis Kruger c4236c6762 Fix xterm mouse support. 2015-05-31 18:18:30 -04:00
Keith Winstein c6cd99ba97 terminalfunctions.cc: Refactor out set_if_available() 2014-12-15 21:04:08 -08:00
Andrew Chin e115f05f0d Clear other mouse modes if 1000 or 1002 are set
I'm not sure if this is correct, but tmux does this!

Signed-off-by: Andrew Chin <achin@eminence32.net>
2014-12-15 20:55:28 -08:00
Andrew Chin 0be97a80bd Implement UTF8 mouse mode (SET_EXT_MODE_MOUSE DECSET 1005)
Signed-off-by: Andrew Chin <achin@eminence32.net>
2014-12-08 20:41:11 -05:00
Bazyli Brzóska 492cfa3449 Implement vt100 mouse mode (1000)
(closes #461)
2014-01-04 02:42:26 -05:00
Bazyli Brzóska 926bbcc746 Implement xterm extended mouse mode 2014-01-04 02:42:15 -05:00
Bazyli Brzóska 5ef7f43479 Implement xterm mouse mode 2014-01-04 02:42:15 -05:00
Barosl LEE c6bf3a2025 Implement bracketed paste mode
Allow bracketed paste mode-setting control sequences to be passed to the
outer terminal.

Signed-off-by: Barosl LEE <vcs@barosl.com>

Closes #430
2013-07-01 03:18:16 -04:00
sqweek 5af90cc1ac Don't touch window title before an OSC is received.
Fixes the "window title being clobbered" issue raised in issue 137.

Signed-off-by: sqweek <sqweek@gmail.com>

Closes #380. Closes #137.
2013-03-10 15:44:49 -04:00
sqweek 13a16332d4 Treat empty OSC number as zero.
For interoperability's sake, accept OSCs of the form ESC];title^G
treating them the same as ESC]0;title^G

Signed-off-by: sqweek <sqweek@gmail.com>
2013-03-10 15:44:17 -04:00
Keith Winstein 92ecb99b71 Add OpenSSL licensing exception 2012-07-20 16:46:00 -04:00
Keith Winstein 22375a2d54 Tabulation clear preserves wrap state (per davidben) 2012-05-06 20:01:39 -04:00
Keith Winstein 3bdcc98ba4 Tab preserves, but does not set, wrap state when used in last col.
Fixes vttest regression.
2012-05-05 00:04:43 -04:00
Keith Winstein bfa0999089 Final tab-related bugfix (of the morning). Now matches xterm more closely. 2012-04-16 11:31:37 -04:00
Keith Winstein d0a818d2e2 Track icon name and window title separately. Implement MOSH_TITLE_NOPREFIX 2012-04-14 01:55:28 -04:00
Keith Winstein 53f79e4261 Fix vttest "Funny scrolling regions" by ignoring some invalid scroll regions
Addresses #155 github issue.
2012-04-14 01:11:57 -04:00
Keith Winstein 4144f2e4f0 Don't clear wrap state on DEC set mode escape (matches xterm) 2012-04-11 01:58:20 -04:00
Keith Winstein 57d97209c0 Support 256color (and assume 256color terminal). Closes #3 github issue. 2012-03-16 13:46:55 -04:00
Anders Kaseorg af649a035c Add missing #includes
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-02-17 19:24:51 -05:00
Keith Winstein 3781a290c8 Add copyright/license notices 2012-02-06 20:52:48 -05:00
Keith Winstein 38c9e99882 Separate modules by subdirectory 2012-02-06 18:26:45 -05:00