summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tty.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* _absolute is redundant, just use tty_region.nicm2009-10-121-3/+5
|
* Cleanup: use two functions for region setting, one for absolute and one insidenicm2009-10-121-17/+36
| | | | pane.
* Like linefeed, don't set the scroll region for reverse index unless it will benicm2009-10-111-8/+7
| | | | | | 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 scrollingnicm2009-10-101-4/+3
| | | | is actually going to happen, so don't.
* The UTF-8 detection idea doesn't work and I am reasonably happy with thenicm2009-10-091-82/+1
| | | | current methods, so remove the (already #ifdef 0'd) code.
* Be less aggressive about turning the cursor off, only explicitly turn it offnicm2009-10-091-3/+7
| | | | 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 loginnicm2009-09-231-7/+12
| | | | | | | 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 upnicm2009-09-231-1/+4
| | | | from locking.
* Remove the internal tmux locking and instead detach each client and run thenicm2009-09-231-3/+1
| | | | | | | | | | | | | | 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 clientnicm2009-09-231-1/+22
| | | | | | | 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 fdnicm2009-09-231-23/+25
| | | | | | | | | 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,nicm2009-09-221-2/+2
| | | | 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 colournicm2009-09-101-2/+3
| | | | palette by setting "colour0" to "colour255".
* Add a new display-panes command, with two options (display-panes-colour andnicm2009-08-311-2/+1
| | | | | display-panes-time), which displays a visual indication of the number of each pane.
* Emulate dch/dch1 if missing by redrawing the entire line.nicm2009-08-211-3/+7
|
* Send SGR0 when initialising the screen. Fixes problems on terminals with BCEnicm2009-08-141-3/+4
| | | | | (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 multiplenicm2009-08-121-20/+22
| | | | | | | 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 itnicm2009-08-111-1/+2
| | | | | | 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 andnicm2009-08-111-6/+10
| | | | | | | | | 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.nicm2009-08-111-18/+18
|
* Drop the no_stop argument to tty_close and tty_free in favour of a flag in thenicm2009-08-111-6/+11
| | | | tty struct.
* Change the way the grid is stored, previously it was:nicm2009-08-081-3/+3
| | | | | | | | | | | - 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.
* If colours are not supported by the terminal, try to emulate a colourednicm2009-08-051-7/+21
| | | | | | | | background by setting or clearing the reverse attribute. This makes a few applications which don't use the reverse attribute themselves a little happier, and allows the status, message and mode options to have default attributes and fg/bg options that work as expected when set as reverse.
* Add a terminal-overrides session option allowing individual terminfo(5) entriesnicm2009-08-031-3/+4
| | | | | | | | to be overridden. The 88col/256col checks are now moved into the default setting and out of the code. Also remove a couple of old workarounds for xterm and rxvt which are no longer necessary (tmux can emulate them if missing).
* Draw UTF-8 characters under the selection correctly.nicm2009-07-271-3/+6
|
* tty_write is relatively short and the only function left in tty-write.c so movenicm2009-07-221-1/+32
| | | | it into tty.c.
* More tty code tidying: move the saved cursor/region position (from before thenicm2009-07-221-46/+46
| | | | screen was updated) out of struct screen and into struct tty_ctx.
* enum tty_cmd is only used as an index into the array of command functionnicm2009-07-221-43/+5
| | | | | pointers, so remove it and use the function pointers directly to represent themselves.
* There are relatively few arguments to tty_cmd_* functions now, so tidy them upnicm2009-07-221-91/+78
| | | | by using a struct rather than hiding everything with varargs.
* tty_cmd_raw is only used once, for raw UTF-8 output, so rename it tonicm2009-07-221-8/+11
| | | | tty_cmd_utf8character and eliminate the size argument.
* Don't send initialisation strings is1/2/3 (barely anything else does) and movenicm2009-07-101-6/+4
| | | | | smcup to the first and rmcup to the last sequences output to the terminal. This allows tmux to use the alternate screen (smcup/rmcup) when available.
* Handle empty or unset TERM correctly; also fix a fatal() message while here.nicm2009-07-071-3/+3
|
* Copy the 256-colour flag into the tty saved cell as well as the actual colour,nicm2009-06-271-1/+5
| | | | otherwise colour 8 isn't reset properly.
* Miscellaneous unused functions, including one which was basically anicm2009-06-251-11/+1
| | | | duplicate. Found by lint.
* Unused variables. Found by lint, no binary change.nicm2009-06-251-4/+2
|
* Trying to predict the cursor position for UTF-8 output in the same way as fornicm2009-06-241-6/+19
| | | | | | normal eight-bit output is wrong, separate it into a different function. Fixes spacing when mixing UTF-8 with some escape sequences, notably the way w3m does it.
* Implement the DEC alignment test. With the last change this is enough for thenicm2009-06-031-1/+21
| | | | | first cursor test in vttest (in ports) to pass; it still shops a few more problems though.
* Fix some miscalculations when clearing to start of screen: the number of linesnicm2009-06-031-2/+2
| | | | to the cursor is cy not cy - 1, and the current cursor cell should be included.
* Recent code to try and detect if a terminal supports UTF-8 by printing to itnicm2009-06-021-1/+5
| | | | | fails spectacularly on (at least) sparc64, so disable it for now. Thanks to naddy and Josh Elsasser for help and testing.
* Import tmux, a terminal multiplexor allowing (among other things) a singlenicm2009-06-011-0/+1076
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