Commit Graph

135 Commits

Author SHA1 Message Date
Nicholas Marriott
99cc0015f8 Rework reflow code so it does not do so much allocation which should be faster
with large histories.
2013-02-10 18:15:30 +00:00
Thomas Adam
64da762c15 Merge branch 'obsd-master' 2013-02-07 12:08:55 +00:00
Nicholas Marriott
8903c1f167 Automatically reflow wrapped lines when a pane is resized, requested by
many over the years and finally implemented by Richard Woodbury.
2013-02-05 11:08:59 +00:00
Tiago Cunha
a432fcd306 Sync OpenBSD patchset 1150:
xfree is not particularly helpful, remove it. From Thomas Adam.
2012-07-11 19:34:16 +00:00
Nicholas Marriott
df912e3540 xfree is not particularly helpful, remove it. From Thomas Adam. 2012-07-10 11:53:01 +00:00
Tiago Cunha
dc83ba0372 Sync OpenBSD patchset 1065:
Michael Krysiak points out that some terminals (eg mintty) have cursor
styles 5 and 6 too, so allow them to be set.
2012-03-18 02:11:27 +00:00
Nicholas Marriott
87d092d226 Michael Krysiak points out that some terminals (eg mintty) have cursor
styles 5 and 6 too, so allow them to be set.
2012-03-17 21:37:36 +00:00
Tiago Cunha
391f1f08c0 Expand the Id keyword. 2011-07-09 09:42:33 +00:00
Tiago Cunha
b2f301f4e2 Sync OpenBSD patchset 916:
Support DECSCUSR sequence to set the cursor style with two new
terminfo(5) extensions, Cs and Csr. Written by Ailin Nemui.
2011-05-22 16:26:09 +00:00
Tiago Cunha
719755574d Sync OpenBSD patchset 915:
Support xterm(1) cursor colour change sequences through terminfo(5) Cc
(set) and Cr (reset) extensions. Originally by Sean Estabrooks, tweaked
by me and Ailin Nemui.
2011-05-22 16:25:02 +00:00
Nicholas Marriott
3ea5e06bfb Support DECSCUSR sequence to set the cursor style with two new
terminfo(5) extensions, Cs and Csr. Written by Ailin Nemui.
2011-05-20 19:17:39 +00:00
Nicholas Marriott
944b5e6fa0 Support xterm(1) cursor colour change sequences through terminfo(5) Cc
(set) and Cr (reset) extensions. Originally by Sean Estabrooks, tweaked
by me and Ailin Nemui.
2011-05-20 19:03:58 +00:00
Tiago Cunha
b5812013ef Sync OpenBSD patchset 901:
Don't use strnvis for the title as it breaks UTF-8. set-titles is now
off by default and we have to trust the terminal can understand what we
send it anyway so there isn't any harm.
2011-05-05 10:10:57 +00:00
Nicholas Marriott
a70df70d20 Don't need vis.h anymore. 2011-05-04 17:43:35 +00:00
Nicholas Marriott
b1dfc740a3 Don't use strnvis for the title as it breaks UTF-8. set-titles is now
off by default and we have to trust the terminal can understand what we
send it anyway so there isn't any harm.
2011-05-04 17:43:11 +00:00
Nicholas Marriott
0b8ce56d73 Fix rectangle copy to behave like emacs - the cursor is not part of the
selection on the right edge but on the left it is.
2010-12-11 17:57:28 +00:00
Nicholas Marriott
20ed20ea1e Fix rectangle copy to behave like emacs - the cursor is not part of the
selection on the right edge but on the left it is.
2010-12-11 17:56:01 +00:00
Nicholas Marriott
11497af4dd Solaris has MAXHOSTNAMELEN in netdb.h. 2010-07-19 18:31:42 +00:00
Nicholas Marriott
3743238a86 From Bob Beck:
rather than using an empty "" as the default window title, put the hostname
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.
2010-04-06 22:01:32 +00:00
Nicholas Marriott
ac9daf92d7 Merge copy mode and output mode, dropping the latter. Idea and code from
Micah Cowan.
2010-04-06 21:35:44 +00:00
Micah Cowan
2d74ce1d3a Merge output (more) and copy modes into one single mode (called copy). 2010-04-05 05:11:44 +00:00
Bob Beck
6704c86301 rather than using an empty "" as the default window title, put the hostname
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-04-04 23:05:15 +00:00
Tiago Cunha
3c37b09272 Sync OpenBSD patchset 636:
Rectangle copy support, from Robin Lee Powell.
2010-02-08 18:13:17 +00:00
Nicholas Marriott
3ef3802629 Rectangle copy support, from Robin Lee Powell. 2010-02-06 17:35:01 +00:00
Tiago Cunha
4d8d70a846 Sync OpenBSD patchset 598:
Fix selection behaviour when the cursor is moved backwards (ie so the selection
start is after the end).
2010-01-05 23:54:53 +00:00
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
Tiago Cunha
cc094fdfe6 Sync OpenBSD patchset 581:
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-04 22:14:47 +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
Tiago Cunha
37b0bcd7c1 Sync OpenBSD patchset 226:
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 contains 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-09 17:28:24 +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
Tiago Cunha
09c6432854 Sync OpenBSD patchset 207:
Plug some memory leaks.
2009-07-30 21:14:04 +00:00
Nicholas Marriott
97f105cde2 Plug some memory leaks. 2009-07-30 20:41:48 +00:00
Nicholas Marriott
c30fbd1d8d 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-18 11:06:35 +00:00
Nicholas Marriott
21cfef45d6 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:55 +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
e63567d51c 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-14 06:40:33 +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
8be8016a76 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-12 17:03:11 +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
2ddcb51df3 Fix $Id$. 2009-07-08 18:03:03 +00:00
Nicholas Marriott
9875be3327 When reinitialising the screen, do not omit to clear the last line. 2009-07-08 18:02:31 +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
32312e0252 vis compat stuff. 2009-06-25 20:27:32 +00:00
Nicholas Marriott
a5830b9603 Restore $Id$ and add script to do so. 2009-06-25 16:21:32 +00:00
Nicholas Marriott
3ec8efc803 Fix a type mismatch warning in assignment. 2009-06-25 16:04:43 +00:00
Nicholas Marriott
e6e1b45fa1 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.
2009-06-25 16:02:10 +00:00
Nicholas Marriott
1b245388b5 Proper support for tab stops (\033H etc), using a bitstring(3). Makes another
vttest test happy.
2009-06-25 15:54:38 +00:00
Nicholas Marriott
7597cb6834 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.
2009-06-25 15:49:27 +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