Commit Graph

47 Commits

Author SHA1 Message Date
John Hood 2ac3bbeb9b Fix prediction unicode bug. Make all Cell members private.
Fixes #702.
2015-12-24 22:27:17 -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
Anders Kaseorg 10dd74c016 NotificationEngine: Fix -Weffc++ warning
Fixes warning: ‘Overlay::NotificationEngine::escape_key_string’ should
be initialized in the member initialization list.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2015-06-11 01:16:52 -04:00
John Hood fc80eaaecf Show the escape key properly when server unavailable.
Fixes #624.

Signed-off-by: John Hood <cgull@glup.org>
2015-06-11 00:49:06 -04:00
Alexander Chernyakhovsky 172b1e5cef Cast time_elapsed to int before calling human_readable_duration
When attempting to build againt EPEL 5, it was noticed that
human_readable_duration expects an int, but time_elapsed is an
integer.  Explicitly static_cast<int>( time_elapsed ) to appease older
compilers.
2013-03-27 02:15:25 -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
Keith Winstein e2b40fcaa7 Show infobar when Ctrl-^ is typed. 2012-11-26 04:03:04 -05:00
Keith Winstein b018e3a1ab Make "elapsed time" human readable even when other error is displayed 2012-11-05 22:02:46 -05:00
Keith Winstein cdd00fee42 Simplify implementation of human_readable_duration() 2012-11-05 21:57:02 -05:00
Kevin Ballard efbe9b2bab Make the 'lost contact' string more human-readable
Teach the 'lost contact' warning string about time units larger than
seconds. After 60 esconds it will switch over to using a time display
that looks like 1:23, or 1:02:34.

Fixes #321.

Signed-off-by: Kevin Ballard <kevin@sb.org>
2012-11-05 18:39:09 -08:00
Keith Winstein bf8a29f783 Improve rendition-matching prediction heuristic. 2012-08-14 07:40:50 -04:00
Keith Winstein 63e66e9855 Add heuristic to match predicted rendition based on char to the left 2012-08-13 10:56:50 -04:00
Keith Winstein 92ecb99b71 Add OpenSSL licensing exception 2012-07-20 16:46:00 -04:00
Keith Winstein 2df9e07926 Add "experimental" mode to local echo (always predict even when incorrect) 2012-06-11 13:21:44 -04:00
Keegan McAllister dee09fb8fc Update notification less often when disconnected for at least 60 s
Saves battery power.  Closes #243.
2012-05-09 14:19:46 -04:00
Keegan McAllister 24d2b6e185 Calculate wait_time separately for {Notification,Prediction}Engine
Simplifies access to private data, including the next commit.

git renders this diff poorly.  It's a bit better with --patience.
2012-05-09 14:19:46 -04:00
Keegan McAllister 02c04fbdaa Display sendto() exception until a successful send 2012-05-09 14:19:46 -04:00
Keith Winstein 0901cd8431 Don't flag blank->blank predictions. 2012-05-05 11:21:01 -04:00
Keith Winstein 2ea3f3a347 Warn when server has not heard from us (even if we have heard from server) 2012-04-30 22:43:45 -04:00
Keith Winstein 24d48f37a4 Don't try to predict scroll until we have versioned cell predictions.
Closes #6
2012-04-19 01:11:16 -04:00
Keith Winstein b127a92617 Back off overlay frame rate when all timing tests have fired (saves CPU)
Closes #225 github issue (Jay Freeman).
2012-04-19 00:07:51 -04:00
Keith Winstein cca925e020 Reset prediction engine after size has changed (i.e. after Resize is applied) 2012-04-16 03:06:11 -04:00
Keegan McAllister cd2d482484 Don't use *_t for our own typedefs
It's reserved by POSIX.

(closes #158 pull request)
2012-04-15 13:50:18 -04:00
Keegan McAllister 280400152d Replace one find_if with a loop
g++/libstdc++ 4.1.2 is unhappy with this use of bind2nd, possibly because the
argument is a reference.  This is a problem for EL5.
2012-04-15 13:49:15 -04:00
Keegan McAllister 2675f13676 Remove boost::lambda remaining instances from terminaloverlay.cc 2012-04-15 13:49:15 -04:00
Keegan McAllister 06fa8eaedb Remove boost::lambda from PredictionEngine::get_or_make_row 2012-04-15 13:49:15 -04:00
Keegan McAllister 5f1bc88ed8 Remove boost::lambda with for_each in terminaloverlay.cc 2012-04-15 13:49:15 -04:00
Keegan McAllister 8f099cafbb Remove boost::lambda from ConditionalOverlayCell::get_validity 2012-04-15 13:49:15 -04:00
Keegan McAllister 4152af9c8e Remove BOOST_AUTO from terminaloverlay.cc 2012-04-15 13:49:15 -04:00
Keith Winstein 45487f6623 Handle crazy cursor more gracefully (closes #168) 2012-04-13 14:03:16 -04:00
Keith Winstein bc3297aa75 Small cleanup to generated output when predictions active 2012-03-10 06:42:21 -05:00
Keith Winstein dc1c49975f Underline when empirical delay gets >500ms, even if SRTT hasn't (fixes #35) 2012-03-07 04:09:40 -05:00
Keith Winstein 562ab991c8 Turn off prediction display only when quiescent (fixes #36 github issue) 2012-03-07 03:51:31 -05:00
Keith Winstein b2abc0d9b6 Fix bug causing too-aggressive prediction (showing part of passwords) 2012-02-26 05:20:16 -05:00
Keith Winstein afacda98e4 Fix propagation of "unknown" last column on emacs and emacs-like delete 2012-02-25 23:08:56 -05:00
Keith Winstein 10fdb6abff Make echo ack the ONLY check for prediction expiration (closes #16 on github) 2012-02-25 15:06:47 -05:00
Keith Winstein a2b293c027 Make retry more aggressive even absent new data (fixes #23 github issue) 2012-02-25 12:12:16 -05:00
Anders Kaseorg 7d19fbe203 Replace C++0x auto with Boost Typeof library
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-02-17 21:29:51 -05:00
Anders Kaseorg bd3ffb85d5 Replace C++0x lambda with Boost Lambda Library
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-02-17 21:29:51 -05:00
Anders Kaseorg f914d1747d Replace C++0x nullptr with 0
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-02-17 20:22:12 -05:00
Anders Kaseorg 6c52c1d306 Purge ‘using namespace std’ from header files
std::bind and boost::lambda::bind don’t mix.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-02-17 20:22:12 -05:00
Keith Winstein 8c7c5340d4 User selectable prediction mode (fixes #9 github issue) 2012-02-13 03:50:03 -05:00
Keith Winstein c34986471c Give credit to deletion at end of line per Bill (fixes #10 github issue) 2012-02-13 02:44:13 -05:00
Keith Winstein 0b4cf8af3d Only display prediction overlay when triggered by slowness
Here we maintain the predictions always, but we only display the overlay
when either a threshold of smoothed round-trip time is met or temporarily
after a "glitch."
2012-02-09 02:56:01 -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