summaryrefslogtreecommitdiffstats
path: root/screen.c
AgeCommit message (Collapse)Author
2017-02-08Collect sequences of printable ASCII characters and process themnicm
together instead of handling them one by one. This is significantly faster. Sequences are terminated when we reach the end of the line, fill the internal buffer, or a different character is seen by the input parser (an escape sequence, or UTF-8). Rather than writing collected sequences out immediately, hold them until it is necessary (another screen modification, or we consume all available data). This means we can discard changes that would have no effect (for example, lines that would just be scrolled off the screen or cleared). This reduces the total amount of data we write out to the terminal - not important for fast terminals, but a big help with slow (like xterm).
2016-11-24Make the selection able to exist independent of the cursor position, sonicm
that it is not affected by scrolling. If MouseDragEnd1Pane is bound to the new "stop-selection" command: bind -Tcopy-mode MouseDragEnd1Pane stop-selection A selection made with the mouse will stay as it is after button 1 is released. (It also works bound to a key.) From Artem Fokin.
2016-10-13Add support for BCE (background colour erase). This makes various escapenicm
sequences (notable EL and ED but also IL, DL, ICH, DCH) create blank cells using the current background colour rather than the default colour. On modern systems BCE doesn't really have many benefits, but most other terminals now support it, some (lazy) applications rely on it, and it is not hard to include now that we have pane background colours anyway. Mostly written by Sean Haugh.
2016-10-12Redraw selection in tty_draw_line, so it appears when redrawing wholenicm
pane. Reported by Theo Buehler.
2016-10-11Add static in window-*.c and move some internal functions out of tmux.h.nicm
2016-10-10Loads more static, except for cmd-*.c and window-*.c.nicm
2016-09-02Remember the number of lines scrolled into the history (versus clearednicm
into the history) and when resizing only use scrolled lines and not cleared lines (which are probably not intended to reappear). From Chaoren Lin.
2016-07-15Don't update cells in each block of data read from a pane immediately,nicm
instead track them as change (dirty) and update them once at the end, saves much time if repeatedly writing the same cell. Also fix comparison of cells being equal in a few places (memcmp is not enough).
2016-06-10Spelling error (incrased -> increased), from Josh Soref.nicm
2016-01-19I no longer use my SourceForge address so replace it.nicm
2015-12-28Couple of trivial style nits.nicm
2015-10-27Count brackets in #{?...} so that nested conditional formats work, fromnicm
Daniel De Graaf.
2015-08-28Only set default title to hostname on screens that are being used for anicm
window pane, no point in calling gethostname() for temporary screens.
2015-01-11correctly use HOST_NAME_MAX.deraadt
Some notes: POSIX HOST_NAME_MAX doesn't include the NUL. POSIX LOGIN_NAME_MAX and TTY_NAME_MAX do include the NUL. BSD MAXHOSTNAMELEN includes the NUL. Actually, most of the historical BSD MAX* defines did include the NUL, except for the historical mistake of utmp fields without NULs in the string, which directly led to strncpy.. just showing how error prone this kind of accounting is. CSRG did right. Somehow POSIX missed the memo on the concepts of carefulness and consistancy, and we are still paying the price when people trip over this. Of course, glibc is even more amazing (that is a hint to blackhats) ok guenther
2014-11-06Add V for select line with vi(1) keys. From Juho Pohjala.nicm
2014-10-20Tidy up some includes.nicm
2014-10-08Add xreallocarray and remove nmemb argument from xrealloc.nicm
2014-09-01Various minor style and spacing nits.nicm
2014-08-11Fix two copy mode problems:nicm
1. In vi mode the selection doesn't include the last character if you moved the cursor up or left. 2. In emacs mode the selection includes the last character if you moved the cursor to the left. From Balazs Kezes.
2014-01-09Three small changes from Tiago Cunha:nicm
- Check for truncation when copying path. - Don't need to use a temporary buffer in screen_set_title. - Include strerror in output when connecting to server fails.
2013-05-15Don't let cursor position overflow when reflowing, from ChristopherNicholas Marriott
Collins.
2013-03-21Rework reflow code so it does not do so much allocation which should beNicholas Marriott
faster with large histories.
2013-02-05Automatically reflow wrapped lines when a pane is resized, requested byNicholas Marriott
many over the years and finally implemented by Richard Woodbury.
2012-07-10xfree is not particularly helpful, remove it. From Thomas Adam.Nicholas Marriott
2012-03-17Michael Krysiak points out that some terminals (eg mintty) have cursorNicholas Marriott
styles 5 and 6 too, so allow them to be set.
2011-05-20Support DECSCUSR sequence to set the cursor style with two newNicholas Marriott
terminfo(5) extensions, Cs and Csr. Written by Ailin Nemui.
2011-05-20Support xterm(1) cursor colour change sequences through terminfo(5) CcNicholas Marriott
(set) and Cr (reset) extensions. Originally by Sean Estabrooks, tweaked by me and Ailin Nemui.
2011-05-04Don't need vis.h anymore.Nicholas Marriott
2011-05-04Don't use strnvis for the title as it breaks UTF-8. set-titles is nowNicholas Marriott
off by default and we have to trust the terminal can understand what we send it anyway so there isn't any harm.
2010-12-11Fix rectangle copy to behave like emacs - the cursor is not part of theNicholas Marriott
selection on the right edge but on the left it is.
2010-04-06Merge copy mode and output mode, dropping the latter. Idea and code fromNicholas Marriott
Micah Cowan.
2010-04-04rather than using an empty "" as the default window title, put the hostnameBob Beck
of the machine we are running on in there. makes my many green lines easier to deal with without using fiddly options to set it. ok nicm@
2010-02-06Rectangle copy support, from Robin Lee Powell.Nicholas Marriott
2010-01-03Fix selection behaviour when the cursor is moved backwards (ie so the selectionNicholas Marriott
start is after the end).
2009-12-03Massive spaces->tabs and trailing whitespace cleanup, hopefully for the lastNicholas Marriott
time now I've configured emacs to make them displayed in really annoying colours...
2009-08-08Change the way the grid is stored, previously it was:Nicholas Marriott
- a two-dimensional array of cells; - a two-dimensional array of utf8 data; - an array of line lengths. Now it is a single array of a new struct grid_line each of which represents a line and containts the length and an array of cells and an array of utf8 data. This will make it easier to add additional per-line members, such as flags.
2009-07-30Plug some memory leaks.Nicholas Marriott
2009-07-17When resizing a screen smaller in alternate screen mode, all the lines neededNicholas Marriott
could be consumed by deleting from the bottom, leaving none to be removed from the top. In this case, don't call grid_view_delete_lines with ny of 0 as this is incorrect and causes a bounds check to fatal error if built with -DDEBUG.
2009-07-13Support "alternate screen" mode (terminfo smcup/rmcup) typically used by fullNicholas Marriott
screen interactive programs to preserve the screen contents. When activated, it saves a copy of the visible grid and disables scrolling into and resizing out of the history; when deactivated the visible data is restored and the history reenabled.
2009-07-09When the terminal size is reduced horizontally, don't truncate lines to the newNicholas Marriott
width, so that if the same lines are later increased in size the content reappears.
2009-07-08When reinitialising the screen, do not omit to clear the last line.Nicholas Marriott
2009-06-24Fix a type mismatch warning in assignment.Nicholas Marriott
2009-06-24Change to match xterm's resizing behaviour, including pushing lines into theNicholas Marriott
history from the top when reducing vertical size and pulling them again when increasing size. ok todd sthen
2009-06-04Proper support for tab stops (\033H etc), using a bitstring(3). Makes anotherNicholas Marriott
vttest test happy.
2009-06-03Pass window titles through vis(1). <0x20 is dropped anyway by the input stateNicholas Marriott
machine but top-bit-set nonprintables could cause trouble, and they are neater like this anyway. Suggested by deraadt a few days ago.
2009-06-01Import tmux, a terminal multiplexor allowing (among other things) a singleNicholas Marriott
terminal to be switched between several different windows and programs displayed on one terminal be detached from one terminal and moved to another. ok deraadt pirofti