Commit Graph

63 Commits

Author SHA1 Message Date
Nicholas Marriott
739b937b74 Fix selection behaviour when the cursor is moved backwards (ie so the selection
start is after the end).
2010-01-03 17:12:04 +00:00
Nicholas Marriott
15a64b805e Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last
time now I've configured emacs to make them displayed in really annoying
colours...
2009-12-03 22:50:09 +00:00
Nicholas Marriott
5e01b6d663 Change the way the grid is stored, previously it was:
- 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-08-08 13:29:27 +00:00
Nicholas Marriott
97f105cde2 Plug some memory leaks. 2009-07-30 20:41:48 +00:00
Nicholas Marriott
ad006bc6b6 When resizing a screen smaller in alternate screen mode, all the lines needed
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-17 18:35:11 +00:00
Nicholas Marriott
359285928b Support "alternate screen" mode (terminfo smcup/rmcup) typically used by full
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-13 10:43:52 +00:00
Nicholas Marriott
58361eb965 When the terminal size is reduced horizontally, don't truncate lines to the new
width, so that if the same lines are later increased in size the content
reappears.
2009-07-09 22:48:20 +00:00
Nicholas Marriott
8c497ecac0 When reinitialising the screen, do not omit to clear the last line. 2009-07-08 05:56:11 +00:00
Nicholas Marriott
3db2433448 Fix a type mismatch warning in assignment. 2009-06-24 22:51:47 +00:00
Nicholas Marriott
f4b8f00255 Change to match xterm's resizing behaviour, including pushing lines into the
history from the top when reducing vertical size and pulling them again when
increasing size.

ok todd sthen
2009-06-24 19:12:44 +00:00
Nicholas Marriott
d42fb43f4f Proper support for tab stops (\033H etc), using a bitstring(3). Makes another
vttest test happy.
2009-06-04 18:48:24 +00:00
Nicholas Marriott
2faec76afa Pass window titles through vis(1). <0x20 is dropped anyway by the input state
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-03 19:33:04 +00:00
Nicholas Marriott
35876eaab9 Import tmux, a terminal multiplexor allowing (among other things) a single
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
2009-06-01 22:58:49 +00:00