John Hood
8acee95c02
Resolve Coverity issue with Parser::Transition's ownership of Action *.
...
This commit is somewhat subtle; it informs Coverity that
Parser::Transition only holds an Action* temporarily, and should never
create/delete one. I believe runtime checkers should also understand
this OK.
Signed-off-by: John Hood <cgull@glup.org >
2015-06-10 23:52:25 -04:00
John Hood
026a3f0346
Resolve cppcheck issues.
...
Signed-off-by: John Hood <cgull@glup.org >
2015-06-10 23:50:56 -04: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
Anders Kaseorg
23f0eedb8c
Parser::UTF8Parser::input: Remove dead code for negative size_t
...
size_t is unsigned. Fixes two issues found by the Coverity Scan
service, one about the dead code and one about the std::string
exception being uncaught by mosh-server.
Signed-off-by: Anders Kaseorg <andersk@mit.edu >
2015-06-04 23:50:40 -04:00
Geoffrey Thomas
4b75bcfdd9
terminaldisplay: Make a for loop's boundary better match its body
...
Both f and frame.last_frame must have the same number of rows here, but
since we're iterating over frame.last_frame's rows, make that more
explicit.
2015-06-04 23:47:32 -04:00
Geoffrey Thomas
b5ac92491c
Throw std::exception subclasses instead of std::strings
...
Now everything we throw or catch ourselves is a subclass of
std::exception.
2015-06-04 23:47:32 -04:00
Geoffrey Thomas
aeffb71cfc
Style cleanup: "foo &x", not "foo& x"
2015-06-04 23:47:32 -04:00
Geoffrey Thomas
9e9919c941
UTF8Parser::input: size_t is unsigned, so it can't be negative
2015-06-04 23:47:31 -04:00
Anders Kaseorg
ebecb9bd3a
Remove trailing commas from enums
...
I do sympathize with the motivation for these trailing commas, but
they cause silly build failures with --enable-compile-warnings=error
(which is used at least by the Debian/Ubuntu package).
CXX parseraction.o
In file included from terminal.h:42:0,
from parseraction.cc:37:
terminalframebuffer.h:200:39: error: comma at end of enumerator list [-Werror=pedantic]
MOUSE_REPORTING_ANY_EVENT = 1003,
^
terminalframebuffer.h:210:34: error: comma at end of enumerator list [-Werror=pedantic]
MOUSE_ENCODING_URXVT = 1015,
^
cc1plus: all warnings being treated as errors
Makefile:354: recipe for target 'parseraction.o' failed
Signed-off-by: Anders Kaseorg <andersk@mit.edu >
2015-06-04 08:43:48 -04:00
John Hood
8af7473cc4
Reset XTerm mouse modes on suspend/exit.
2015-05-31 22:50:17 -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
Andrew Chin
94a35958c2
Revert bb36933472
...
We aren't sure why this change was made, and reverting it appears to help
fix mouse issues in emacs related to text hilighting.
Signed-off-by: Andrew Chin <achin@eminence32.net >
2014-12-08 20:40:38 -05:00
Bazyli Brzóska
492cfa3449
Implement vt100 mouse mode (1000)
...
(closes #461 )
2014-01-04 02:42:26 -05:00
Bazyli Brzóska
bb36933472
xterm extended fix
2014-01-04 02:42:15 -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
Daniel "Tracerneo" Ziółkowski
06561d3500
Add support for ECMA-48 escape sequence for italic
...
Closes #443
2013-07-01 03:08:25 -04:00
Anders Kaseorg
64f7f7abb2
Dispatcher::get_{dispatch_chars,OSC_string}: Make const
...
Found by cppcheck
Signed-off-by: Anders Kaseorg <andersk@mit.edu >
2013-03-10 15:48:08 -04:00
Anders Kaseorg
d0eeabb51e
human_readable_duration, Terminal::appendstring: Pass strings by reference
...
Found by cppcheck.
Signed-off-by: Anders Kaseorg <andersk@mit.edu >
2013-03-10 15:48:08 -04:00
Anders Kaseorg
ea3ad786fa
scripts/mosh: Add --no-init option to disable alternate screen mode
...
Signed-off-by: Anders Kaseorg <andersk@mit.edu >
Closes #384 . Closes #2 .
2013-03-10 15:46:49 -04:00
Anders Kaseorg
ed42d31bda
Put the real terminal in alternate screen mode
...
Closes #2
Signed-off-by: Anders Kaseorg <andersk@mit.edu >
2013-03-10 15:46:39 -04:00
Anders Kaseorg
2ae960f7f0
Display: Abstract terminfo capability functions
...
Signed-off-by: Anders Kaseorg <andersk@mit.edu >
2013-03-10 15:46:38 -04:00
Anders Kaseorg
03217ddb5a
Move Emulator::{open,close} to Display
...
Signed-off-by: Anders Kaseorg <andersk@mit.edu >
2013-03-10 15:46:38 -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
Anton Lundin
438d0d8b9a
Use the right term.h
...
When ncurses is in a separate include dir, we need to take the term.h
from there to match with the [n]curses.h
2012-12-16 17:30:14 +01:00
Anton Lundin
993abf57f1
Rework curses detection
...
Detect diffrent variants of curses and use them.
2012-12-01 12:53:28 +01:00
Keith Winstein
02f54881be
Use BEL instead of ST to terminate Operating System Command
...
ST is more correct, but BEL is apparently more widely supported.
Closes #304
2012-07-26 22:01:53 -04:00
Anders Kaseorg
5e3ec2e037
Instantiate Parser::family once
...
Signed-off-by: Anders Kaseorg <andersk@mit.edu >
2012-07-24 15:01:55 -04:00
Keith Winstein
92ecb99b71
Add OpenSSL licensing exception
2012-07-20 16:46:00 -04:00
Keith Winstein
8026c924dc
Quit with cursor visible.
2012-05-23 11:44:49 -04:00
Larry Doolittle
eda48085ba
Simple spelling fixes
2012-05-23 05:11:05 -04:00
Keith Winstein
1cf12f9e9b
Prevent integer overflow of very large escape sequence params. Fixes #274 .
2012-05-16 12:16:50 -04:00
Keith Winstein
9791768705
Cap escape sequence parameters to prevent long loops.
...
Fixes #271 github issue.
2012-05-15 23:46:09 -04:00
Keith Winstein
22375a2d54
Tabulation clear preserves wrap state (per davidben)
2012-05-06 20:01:39 -04:00
Keith Winstein
43182729ec
More graceful output from failed verification
2012-05-05 01:53:28 -04:00
Keith Winstein
48fbe3d0e1
Correctly handle wrapped lines where first portion is blank
2012-05-05 01:45:19 -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
c8951c7dfd
Use memmove() where ranges may overlap. Fixes #200 (Matthew Dempsky).
2012-04-16 18:22:27 -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
0293e579d2
Properly reset tab stops on resize
2012-04-16 09:55:59 -04:00
Keegan McAllister
c390ee9b80
Hardcode the terminals which accept "set window title"
...
terminfo does not have reliable information on this, so we hardcode a whitelist
of terminal type prefixes. This is the list from Debian's default screenrc,
plus "screen" itself (which also covers tmux).
Closes #172 .
Closes #191 .
2012-04-16 09:23:30 -04:00
Keith Winstein
feb352c809
Optional verifier for round-trippability, and fix wrapping and tab bugs.
2012-04-16 09:09:20 -04:00
Keith Winstein
c15d3d0c48
Use "ANSI-mode" cursor keys only on actual cursor keys (A through D).
...
Fixes #161 .
2012-04-16 03:44:07 -04:00