summaryrefslogtreecommitdiffstats
path: root/input.c
AgeCommit message (Collapse)Author
2010-04-18Sync OpenBSD patchset 683:Tiago Cunha
Fix typo in escape state table leading to fatal() when \033} or \033~ was entered, from Chris Johnsen.
2010-03-15New input parser based on http://vt100.net/emu/dec_ansi_parser.Nicholas Marriott
2010-02-08Sync OpenBSD patchset 642:Tiago Cunha
Add an option to disable the smcup/rmcup alternate screen behaviour inside tmux. From clemens fischer.
2010-01-08Sync OpenBSD patchset 599:Tiago Cunha
Correctly clear 256-colour flag for aixterm colours.
2009-12-16Sync OpenBSD patchset 589:Tiago Cunha
Pass through the aixterm bright colours if the terminal supports them (>= 16 colours).
2009-12-04Sync OpenBSD patchset 581:Tiago Cunha
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-11-28Sync OpenBSD patchset 574:Tiago Cunha
Add a couple of comments.
2009-11-08Sync OpenBSD patchset 498:Tiago Cunha
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-10-28Sync OpenBSD patchset 467:Tiago Cunha
tabs are better; ok nicm
2009-10-25Sync OpenBSD patchset 441:Tiago Cunha
Support the bright fg/bg colour SGR 90-97 and 100-107. Reported by Tim Allen.
2009-10-23Sync OpenBSD patchset 424:Tiago Cunha
%zu not %u, doh.
2009-10-23Sync OpenBSD patchset 421:Tiago Cunha
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-15Sync OpenBSD patchset 408:Tiago Cunha
Handle DECCOLM by just emulating its side-effect of clearing the screen.
2009-10-15Sync OpenBSD patchset 400:Tiago Cunha
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-08-21Sync OpenBSD patchset 281:Tiago Cunha
Nuke unused variable.
2009-08-20Sync OpenBSD patchset 280:Tiago Cunha
Handle the device attributes (DA) escape sequence.
2009-08-20Sync OpenBSD patchset 275:Tiago Cunha
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-19Didn't mean to commit this stuff.Nicholas Marriott
2009-08-19This is a better fix for OS X stupidity.Nicholas Marriott
2009-08-09Sync OpenBSD patchset 227:Tiago Cunha
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-09Sync OpenBSD patchset 223:Tiago Cunha
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-07-22Sync OpenBSD patchset 155:Tiago Cunha
Make some functions which return unused values void (mostly found by lint) and tweak a redundant expression in window_pane_set_mode.
2009-07-14Support "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-06-25Restore $Id$ and add script to do so.Nicholas Marriott
2009-06-25Implement the CBT (backward tab) sequence (\033[Z).Nicholas Marriott
2009-06-25Proper support for tab stops (\033H etc), using a bitstring(3). Makes anotherNicholas Marriott
vttest test happy.
2009-06-25Okay, so I screwed up when testing this, doh. Unbreak so that CAN/SUB actuallyNicholas Marriott
do cancel the sequence, and tweak to make the code more clear.
2009-06-25Oops, CAN and SUB should abort the sequence (return to first state), not remainNicholas Marriott
in the same state.
2009-06-25More input compatibility love. Support C0 within escape sequences, and the C0Nicholas Marriott
control character VT (vertical tab, \013), which is treated as LF like VT102. Makes another vttest happy.
2009-06-25Implement the DEC alignment test. With the last change this is enough for theNicholas Marriott
first cursor test in vttest (in ports) to pass; it still shops a few more problems though.
2009-06-25Pass 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.
2009-05-04Space trimmage mega-diff.Nicholas Marriott
2009-04-23Support NEL.Nicholas Marriott
2009-03-28Better UTF-8 support, including combined characters. Unicode data is now storedNicholas Marriott
as UTF-8 in a separate array, the code does a lookup into this every time it gets to a UTF-8 cell. Zero width characters are just appended onto the UTF-8 data for the previous cell. This also means that almost no bytes extra are wasted non-Unicode data (yay). Still some oddities, such as copy mode skips over wide characters in a strange way, and the code could do with some tidying.
2009-03-28Step 2 of the Grand Plan To Make UTF-8 Better.Nicholas Marriott
Split grid into two arrays, one containing grid attributes/flags/colours (keeps the name grid_cell for now) and a separate with the character data (called text). The text is stored as a u_short but is treated as a uint64_t elsewhere; eventually the grid will have two arrays. I'm not happy with the naming so that might change. Still need to decide where to go from here. I'm not sure whether to combine the peek/set functions together, and also whether to continue to treat the text as a uint64_t (and convert to/from Unicode) or make it a char array (of size one when UTF-8 disabled, eight when enabled) and keep everything as UTF-8. Also since UTF-8 will eventually become an attribute of the grid itself it might be nice to move all the padding crap into grid.c.
2009-01-18Unbreak UTF-8.Nicholas Marriott
2009-01-11Window splitting. Two vertical panes fixed 50% each. This is a huge diff, ↵Nicholas Marriott
still a couple of bugs (notably heap corruption somewhere causing segfault on exit).
2009-01-10Trim spaces.Nicholas Marriott
2009-01-08Don't return NULL when retrieving a string that is too long.Nicholas Marriott
2009-01-07Introduce nitems() and use it; use bsearch.Nicholas Marriott
2008-12-08Make window options work the same was as session options, add ↵Nicholas Marriott
mode-fg/mode-bg options, force -g for global on set/show/setw/showw/
2008-12-05Ability to show window title on status line.Nicholas Marriott
2008-11-16Disable UTF-8 by default and add options to enable it.Nicholas Marriott
2008-11-04Record intermediate for p2/s2 and fake up charset redefinition (some ↵Nicholas Marriott
programs use it to switch character set).
2008-11-04This breaks mutt.Nicholas Marriott
2008-11-04Alternative charset commands.Nicholas Marriott
2008-10-09Better OSC support for title setting, and support APC as well.Nicholas Marriott
2008-09-26SGR should not reset charset... don't know how this worked before...Nicholas Marriott
2008-09-26Make RIS also reset scroll region.Nicholas Marriott
2008-09-26Trim.Nicholas Marriott