aboutsummaryrefslogtreecommitdiff
path: root/tty.c
Commit message (Collapse)AuthorAge
...
| * Clear to the end of the screen from the right starting point when drawingNicholas Marriott2009-11-05
| | | | | | | | | | line-by-line (in panes or if ed not supported). Fixes problem spotted by Frank Terbeck.
| * Switch tty key input over to happen on a read event. This is a bit moreNicholas Marriott2009-11-05
| | | | | | | | | | | | | | | | | | | | complicated because of escape input, but in that case instead of processing a key immediately, schedule a timer and reprocess the bufer when it expires. This currently assumes that keys will be atomic (ie that if eg F1 is pressed the entire sequence is present in the buffer). This is usually but not always true, a change in the tree format so it can differentiate potential (partial) key sequences will happens soon and will allow this to be fixed.
| * Switch tty fds over to a bufferevent.Nicholas Marriott2009-11-04
| |
| * Ignore the colour on space, /not/ the attributes.Nicholas Marriott2009-11-04
| |
| * Fix the reverse emulation when a terminal doesn't have setab to use the correctNicholas Marriott2009-11-04
| | | | | | | | fg/bg (adjusted if spaces) and happen before attribute setting.
| * Add a minor optimisatin: if the character being printed is space, don't worryNicholas Marriott2009-10-28
| | | | | | | | about setting the background colour or attributes (except reverse).
| * Twaek this slightly to avoid confusing use of flags variable.Nicholas Marriott2009-10-28
| |
| * Setting SGR0 when setting the fg and bg has problems if only one of the two isNicholas Marriott2009-10-28
| | | | | | | | | | | | | | | | meant to be default, so rewrite the code to move this outside, move setting colours before attributes and generally clean up. Tested by sthen@, fixes problems he was seeing with mutt and should fix some existing problems with (rarely) lost attributes.
| * tabs are better; ok nicmTheo Deraadt2009-10-26
| |
| * Remove the -d flag to tmux and just use op/AX to detect default colours.Nicholas Marriott2009-10-25
| | | | | | | | | | | | | | | | | | | | | | | | Irritatingly, although op can be used to tell if a terminal supports default colours, it can't be used to set them because in some terminfo descriptions it resets attributes as a side-effect (acts as sgr0) and in others it doesn't, so it is not possible to determine reliably what the terminal state will be afterwards. So if AX is missing and op is present, tmux just sends sgr0. Anyone using -d for a terminal who finds they actually needed it can replace it using terminal-overrides, but please let me know as it is probably an omission from terminfo.
| * Unused variable.Nicholas Marriott2009-10-21
| |
| * Now we are correctly not redrawing the whole pane on linefeed, redo theNicholas Marriott2009-10-21
| | | | | | | | last-cursor-position code to move to the right position when panes reach EOL.
| * Don't redraw the scroll region on linefeed/reverse index unless it is necessaryNicholas Marriott2009-10-21
| | | | | | | | | | (the cursor is at the bottom/top). Should fix slow cursor movement when using vi in a pane spotted by pirofti@.
| * Some terminals don't correctly clear their let's-wrap flag after changing theNicholas Marriott2009-10-21
| | | | | | | | | | | | | | scroll region (which moves the cursor to 0,0). This means that if the cursor was at the edge of the screen, any further output after scroll region change incorrectly causes a line wrap. Add a workaround to move the cursor to position 0 if it is at the screen edge before changing scroll region.
| * Try to reduce the UTF-8 mess.Nicholas Marriott2009-10-20
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * UTF-8 combined character fixes.Nicholas Marriott2009-10-20
| | | | | | | | | | | | | | | | | | | | Thai can have treble combinations (1 x width=1 then 2 x width=0) so bump the UTF-8 cell data size to 9 and alter the code to allow this. Also break off the combining code into a separate function, handle any further combining beyond the buffer size by replacing the character with _s, and when redrawing the UTF-8 character don't assume the first part has just been printed, redraw the entire line.
| * Move the check for whether to force a line wrapper lower down into the tty codeNicholas Marriott2009-10-20
| | | | | | | | where it has access to the tty width, which is what should have been checked.
| * Always move the cursor position on !xenl terminals, since there is no invisibleNicholas Marriott2009-10-17
| | | | | | | | | | | | last cursor position. Also nuke an unused variable.
| * Instead of having a complicated check to see if the cursor is in the lastNicholas Marriott2009-10-17
| | | | | | | | | | | | position to avoid an explicit wrap, actually move it there. Some UTF-8 fixes to come.
| * When checking whether the region will scroll and the cursor position is thusNicholas Marriott2009-10-16
| | | | | | | | | | unsuitable for using CUD/CUU, check the current cursor position not the target position.
| * Don't try to use \n across scroll region when doing \r\n either.Nicholas Marriott2009-10-13
| |
| * Instead of using something sort of similar for both newline checks, useNicholas Marriott2009-10-13
| | | | | | | | something the same. Doesn't fix the bug I'm looking for though :-/.
| * When drawing lines that have wrapped naturally, don't force a newline butNicholas Marriott2009-10-12
| | | | | | | | | | | | | | | | | | | | | | | | permit them to wrap naturally again. This allows terminals that use this to guess where lines start and end for eg mouse selecting (like xterm) to work correctly. This was another long-standing issue raised by several people over the last while. Thanks to martynas@ for much testing. This was not trivial to get right so bringing it in for wider testing and adn to fix any further glitches in-tree.
| * Don't run through the column unchanged case if the row was unchanged but thereNicholas Marriott2009-10-12
| | | | | | | | | | were no suitable optimisations, instead make it an else to fall through to absolute addressing.
| * If the vertical cursor movement crosses the scroll region, CUU and CUDNicholas Marriott2009-10-12
| | | | | | | | shouldn't be used even if VPA isn't present - in that case CUP should be used.
| * Use absolute movement if right at the end of the line as it isn't a reliableNicholas Marriott2009-10-12
| | | | | | | | place to move from relatively.
| * Use relative cursor movement instead of absolute when possible and whenNicholas Marriott2009-10-12
| | | | | | | | | | supported by the terminal to reduce the size of the output data (generally about 10-20%).
| * Similarly add a tty_cursor_pane function to tidy up most of the calls.Nicholas Marriott2009-10-12
| |
| * _absolute is redundant, just use tty_region.Nicholas Marriott2009-10-12
| |
| * Cleanup: use two functions for region setting, one for absolute and one insideNicholas Marriott2009-10-12
| | | | | | | | pane.
| * Like linefeed, don't set the scroll region for reverse index unless it will beNicholas Marriott2009-10-11
| | | | | | | | | | | | needed. While here, also tidy up a couple of long lines and remove an extraneous blank.
| * There is no point setting the scroll region up for line feeds unless scrollingNicholas Marriott2009-10-10
| | | | | | | | is actually going to happen, so don't.
| * The UTF-8 detection idea doesn't work and I am reasonably happy with theNicholas Marriott2009-10-09
| | | | | | | | current methods, so remove the (already #ifdef 0'd) code.
| * Be less aggressive about turning the cursor off, only explicitly turn it offNicholas Marriott2009-10-09
| | | | | | | | when tmux is redrawing, otherwise leave in the state set by the application.
| * Support -c like sh(1) to execute a command, useful when tmux is a loginNicholas Marriott2009-09-23
| | | | | | | | | | | | | | shell. Suggested by halex@. This includes another protocol version increase (the last for now) so again restart the tmux server before upgrading.
| * Don't die if the client is detaching (the tty has been closed) after waking upNicholas Marriott2009-09-23
| | | | | | | | from locking.
| * Remove the internal tmux locking and instead detach each client and run theNicholas Marriott2009-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | command specified by a new option "lock-command" (by default "lock -np") in each client. This means each terminal has to be unlocked individually but simplifies the code and allows the system password to be used to unlock. Note that the set-password command is gone, so it will need to be removed from configuration files, and the -U command line flag has been removed. This is the third protocol version change so again it is best to stop the tmux server before upgrading.
| * Trim some code by moving the ioctl(TIOCGWINSZ) after SIGWINCH from the clientNicholas Marriott2009-09-23
| | | | | | | | | | | | | | into the server. This is another (the second of four) protocol version changes coming this morning, so again the server should be killed before upgrading.
| * Don't attempt to open() the tty path, rely on the client sending its stdin fdNicholas Marriott2009-09-23
| | | | | | | | | | | | | | | | | | with imsg and fatal if it doesn't, then set the FD_CLOEXEC flag in tty_init instead of tty_open to prevent them leaking into child processes if any are created between the two calls. This bumps the protocol version, so the tmux server should be killed before upgrading.
| * Be more careful about what flags are cleared when opening the terminal,Nicholas Marriott2009-09-22
| | | | | | | | otherwise the opened/started flags are cleared and the terminal never released.
| * Permit options such as status-bg to be configured using the entire 256 colourNicholas Marriott2009-09-10
| | | | | | | | palette by setting "colour0" to "colour255".
| * Add a new display-panes command, with two options (display-panes-colour andNicholas Marriott2009-08-31
| | | | | | | | | | display-panes-time), which displays a visual indication of the number of each pane.
| * Emulate dch/dch1 if missing by redrawing the entire line.Nicholas Marriott2009-08-21
| |
| * Send SGR0 when initialising the screen. Fixes problems on terminals with BCENicholas Marriott2009-08-14
| | | | | | | | | | (like putty) if the background colours is non-default when tmux starts. May also fix problems when resuming a suspended tmux.
| * A tty context must not be modified as it may be reused to update multipleNicholas Marriott2009-08-12
| | | | | | | | | | | | | | clients, so make it const. Also fix an actual modification which caused a hang when a session was connected to multiple terminals at least one of which was missing ich/ich1.
| * Initialise log_fd to -1, prevents spurious disconnection of the client when itNicholas Marriott2009-08-11
| | | | | | | | | | | | ends up as fd 0 (likely if the server is started with "tmux start"). Also add some extra debugging messages to server.c.
| * Have the client pass its stdin fd to the server when identifying itself andNicholas Marriott2009-08-11
| | | | | | | | | | | | | | | | | | have the server use that rather than reopening the tty. If the fd isn't given, use the old behaviour (so no need for a version change). This allows tmux to be used as the shell, so also change so that when working out the command to execute if default-command is empty (the default), tmux will try not execute itself.
| * Add a TTY_OPENED flag and tidy a little.Nicholas Marriott2009-08-11
| |
| * Drop the no_stop argument to tty_close and tty_free in favour of a flag in theNicholas Marriott2009-08-11
| | | | | | | | tty struct.
| * Change the way the grid is stored, previously it was:Nicholas Marriott2009-08-08
| | | | | | | | | | | | | | | | | | | | | | - 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.