Commit Graph

229 Commits (master)

Author SHA1 Message Date
Nicholas Marriott 622593a77f Fix typo in escape state table leading to fatal() when \033} or \033~
was entered, from Chris Johnsen.
2010-04-17 23:31:09 +00:00
Nicholas Marriott 4baafd8126 New input parser based on http://vt100.net/emu/dec_ansi_parser. 2010-03-22 19:02:54 +00:00
Nicholas Marriott 11dedde511 Add an option to disable the smcup/rmcup alternate screen behaviour inside
tmux. From clemens fischer.
2010-02-08 00:14:38 +00:00
Nicholas Marriott ad8509f361 Correctly clear 256-colour flag for aixterm colours. 2010-01-06 23:13:52 +00:00
Nicholas Marriott 0dda866679 Pass through the aixterm bright colours if the terminal supports them (>= 16
colours).
2009-12-14 21:33:38 +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 2182e1badc Add a couple of comments. 2009-11-27 09:41:03 +00:00
Nicholas Marriott a02c7e804c Convert the window pane (pty master side) fd over to use a bufferevent.
The evbuffer API is very similar to the existing tmux buffer API so this was
remarkably painless. Not many possible ways to do it, I suppose.
2009-11-04 22:43:11 +00:00
Theo Deraadt ed62d1263c tabs are better; ok nicm 2009-10-26 21:42:04 +00:00
Nicholas Marriott c2b8f3b55a Support the bright fg/bg colour SGR 90-97 and 100-107.
Reported by Tim Allen.
2009-10-23 15:48:39 +00:00
Nicholas Marriott 9afb0d739e %zu not %u, doh. 2009-10-20 22:17:33 +00:00
Nicholas Marriott 1af09d6330 Try to reduce the UTF-8 mess.
Get rid of passing around u_char[4]s and define a struct utf8_data which has
character data, size (sequence length) and width. Move UTF-8 character
collection into two functions utf8_open/utf8_append in utf8.c which fill in
this struct and use these functions from input.c and the various functions in
screen-write.c.

Space for rather more data than is necessary for one UTF-8 sequence is in the
utf8_data struct because screen_write_copy is still nasty and needs to reinject
the character (after combining) into screen_write_cell.
2009-10-20 19:18:28 +00:00
Nicholas Marriott 71dc6e04e8 Handle DECCOLM by just emulating its side-effect of clearing the screen. 2009-10-13 15:23:13 +00:00
Nicholas Marriott 8608c6970d When backspace is received at the beginning of a line and the previous line was
wrapped, move the cursor back up to the end of the previous line.

Another one of the forgotten persons requested this quite a while ago (I need
to start noting names on todo items...) when it was quite hard to
implement. Now it is easy and I don't see it can do any harm, so hey presto...
2009-10-12 16:59:55 +00:00
Nicholas Marriott 234ad54b2c Nuke unused variable. 2009-08-20 10:48:25 +00:00
Nicholas Marriott bf121f7c60 Handle the device attributes (DA) escape sequence. 2009-08-19 17:00:31 +00:00
Nicholas Marriott 036de0c5e4 Instead of just checking for an empty buffer, which may not be the case if
there is unconsumed data, save the previous size and use it instead. This means
that activity monitoring should work in this (unlikely) event.

Also remove a debugging statement that no longer seems necessary.
2009-08-18 21:41:13 +00:00
Nicholas Marriott 06ddd3dcf8 Add a flags member to the grid_line struct and use it to differentiate lines
wrapped at the screen edge from those terminated by a newline. Then use this
when copying to combine wrapped lines together into one.
2009-08-08 15:57:49 +00:00
Nicholas Marriott 04e97e8aef Using the alternative screen (smcup/rmcup) should also preserve the current
colours and attributes. Found thanks to a report from Taylor Venable.

While here also nuke a couple of extra blank lines.
2009-08-07 00:12:13 +00:00
Nicholas Marriott 76a9d98562 Make some functions which return unused values void (mostly found by lint) and
tweak a redundant expression in window_pane_set_mode.
2009-07-21 19:54:22 +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 f031975dc0 Implement the CBT (backward tab) sequence (\033[Z). 2009-06-04 21:02:21 +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 d6015824dd Okay, so I screwed up when testing this, doh. Unbreak so that CAN/SUB actually
do cancel the sequence, and tweak to make the code more clear.
2009-06-04 14:42:14 +00:00
Nicholas Marriott 6c1f03578d Oops, CAN and SUB should abort the sequence (return to first state), not remain
in the same state.
2009-06-04 14:24:49 +00:00
Nicholas Marriott 8dd2f0da3f More input compatibility love. Support C0 within escape sequences, and the C0
control character VT (vertical tab, \013), which is treated as LF like
VT102. Makes another vttest happy.
2009-06-04 14:15:50 +00:00
Nicholas Marriott 52ec9b9ec4 Implement the DEC alignment test. With the last change this is enough for the
first cursor test in vttest (in ports) to pass; it still shops a few more
problems though.
2009-06-03 23:30:40 +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