summaryrefslogtreecommitdiffstats
path: root/tmux.h
AgeCommit message (Collapse)Author
2009-07-22More tty code tidying: move the saved cursor/region position (from before theNicholas Marriott
screen was updated) out of struct screen and into struct tty_ctx.
2009-07-22log_debug3 no longer exists, change the sole use in GRID_DEBUG to log_debug2.Nicholas Marriott
2009-07-22enum tty_cmd is only used as an index into the array of command functionNicholas Marriott
pointers, so remove it and use the function pointers directly to represent themselves.
2009-07-22There are relatively few arguments to tty_cmd_* functions now, so tidy them upNicholas Marriott
by using a struct rather than hiding everything with varargs.
2009-07-22tty_cmd_raw is only used once, for raw UTF-8 output, so rename it toNicholas Marriott
tty_cmd_utf8character and eliminate the size argument.
2009-07-21Make some functions which return unused values void (mostly found by lint) andNicholas Marriott
tweak a redundant expression in window_pane_set_mode.
2009-07-21Remove a couple of unused functions and fix a type ("FALLTHOUGH"), found byNicholas Marriott
lint.
2009-07-21__progname is not const, pointed out by deraadt.Nicholas Marriott
2009-07-21Tidy up keys: use an enum for the key codes, and remove the macros which justNicholas Marriott
wrap flag sets/clears/tests.
2009-07-20Display the number of failed password attempts (if any) when the server isNicholas Marriott
locked. From Tom Doherty.
2009-07-19Improved layout code.Nicholas Marriott
Each window now has a tree of layout cells associated with it. In this tree, each node is either a horizontal or vertical cell containing a list of other cells running from left-to-right or top-to-bottom, or a leaf cell which is associated with a pane. The major functional changes are: - panes may now be split arbitrarily both horizontally (splitw -h, C-b %) and vertically (splitw -v, C-b "); - panes may be resized both horizontally and vertically (resizep -L/-R/-U/-D, bound to C-b left/right/up/down and C-b M-left/right/up/down); - layouts are now applied and then may be modified by resizing or splitting panes, rather than being fixed and reapplied when the window is resized or panes are added; - manual-vertical layout is no longer necessary, and active-only layout is gone (but may return in future); - the main-pane layouts now reduce the size of the main pane to fit all panes if possible. Thanks to all who tested.
2009-07-18Add three new session options: visual-activity, visual-bell, visual-content. IfNicholas Marriott
these are enabled (and the monitor-activity, bell-actio and monitor-content options are configurated appropriately), when activity, a bell, or content is detected, a message is shown. Also tidy up the bell/activity/content code in server.c slightly and fix a couple of errors.
2009-07-17Make it so using kill-pane to destroy the last pane in a window destroys theNicholas Marriott
window instead of being an error.
2009-07-17- New command display-message (alias display) to display a message in theNicholas Marriott
status line (bound to "i" and displays the current window and time by default). The same substitutions are applied as for status-left/right. - Add support for including the window index (#I), pane index (#P) and window name (#W) in the message, and status-left or status-right. - Bump protocol version. From Tiago Cunha, thanks!
2009-07-17Tidy up new-session and attach-session and change them to work from insideNicholas Marriott
tmux, switching the current client to the new or requested session. Written with Josh Elsasser.
2009-07-17A similar for fix for window_choose: don't rely on the callback always beingNicholas Marriott
called to free data, have a separate free callback and call it from the mode cleanup code.
2009-07-17Memory could be leaked if a second prompt or message appeared while another wasNicholas Marriott
still present, so add a separate prompt free callback and make the _clear function responsible for calling it if necessary (rather than the individual prompt callbacks). Also make both messages and prompts clear any existing when a new is set. In addition, the screen could be modified while the prompt is there, restore the redraw-entire-screen behaviour on prompt clear; add a comment as a reminder.
2009-07-15Make status_message_set a variadic printf-like function. No functional change -Nicholas Marriott
helpful for a couple of things coming soon.
2009-07-15Having to update NSETOPTION/NSETWINDOWOPTION when adding new options is a bitNicholas Marriott
annoying and it is only use for iterating, so use a sentinel to mark the end of each array instead. Different fix for a problem pointed out by Kalle Olavi Niemitalo.
2009-07-14Add main-pane-height to the options list (was missed before).Nicholas Marriott
2009-07-14Instead of faking up a status line in status_redraw, use the same code toNicholas Marriott
redraw it as to draw the entire screen, just skip all lines but the last. This makes horizontal split redraw properly when the status line is off.
2009-07-14Get rid of the PANE_HIDDEN flag in favour of a function, and moving theNicholas Marriott
decision for whether or not a pane should be drawn out of the layout code and into the redraw code. This is needed for the new layout design, getting it in now to make that easier to work on.
2009-07-13Having fixed flags for single-character getopt options is a bit hard toNicholas Marriott
maintain and is only going to get worse as more are used. So instead, add a new uint64_t member to cmd_entry which is a bitmask of upper and lowercase options accepted by the command. This means new single character options can be used without the need to add it explicitly to the list.
2009-07-13Tidy up and improve target (-t) argument parsing:Nicholas Marriott
- move the code back into cmd.c and merge with the existing functions where possible; - accept "-tttyp0" as well as "-t/dev/ttyp0" for clients; - when looking up session names, try an exact match first, and if that fails look for it as an fnmatch pattern and then as the start of a name - if more that one session matches an error is given; so if there is one session called "mysession", -tmysession, -tmysess, -tmysess* are equivalent but if there is also "mysession2", the last two are errors; - similarly for windows, if the argument is not a valid index or exact window name match, try it against the window names as an fnmatch pattern and a prefix.
2009-07-13Support "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-07-12Missed this declaration in key bindings change. Whoops.Nicholas Marriott
2009-07-12Add a "back to indentation" key in copy mode to move the cursor to the firstNicholas Marriott
non-whitespace character. ^ with vi and M-m with emacs key bindings. Another from Kalle Olavi Niemitalo, thanks.
2009-07-12If it exist, load a system-wide configuration file /etc/tmux.conf before anyNicholas Marriott
user-specified one.
2009-07-11When pasting, translate \n into \r. This matches xterm and putty's behaviour,Nicholas Marriott
and makes emacs happy when pasting into some modes. A new -r (raw) flag to paste-buffer pastes without the translation. From Kalle Olavi Niemitalo, thanks!
2009-07-10Add a default-terminal option to set the starting value of $TERM in newNicholas Marriott
windows. This is "screen" by default and must be either that or something closely related. This does makes it easier to customise it if necessary.
2009-07-09New command, if-shell (alias if). Executes the tmux command in the secondNicholas Marriott
argument if the shell command in the first succeeds, for example: if "[ -e ~/.tmux.conf.alt ]" "source .tmux.conf.alt" Written by Tiago Cunha, many thanks.
2009-07-09Tidy by removing unused argument from grid_view_{insert,delete}_line_regionNicholas Marriott
functions (currently don't fully work, this is to make fix easier).
2009-07-08Just appending -l to $SHELL to create a login shell is wrong: -l is not POSIX,Nicholas Marriott
and some people may use shells which do not support it. Instead, make an empty default-command option mean a login shell, and fork it with a - in argv[0] which is the method used by login(1). Also fix the automatic-rename code to handle this correctly and to strip a leading - if present.
2009-07-07Rename the global options variables to be shorter and to make session optionsNicholas Marriott
clear. No functional change, getting this out of the way to make later options changes easier.
2009-06-26Remove some unused function declarations; no binary change.Nicholas Marriott
2009-06-25#ifndef nitems to avoid redefining it if it is already in a header.Nicholas Marriott
2009-06-25tmux doesn't and won't need syslog logging, so remove it and some other unusedNicholas Marriott
functions found by lint. Also move a couple of internal function declarations into file scope.
2009-06-25Miscellaneous unused functions, including one which was basically aNicholas Marriott
duplicate. Found by lint.
2009-06-25Nuke unused buffer functions. Found by lint.Nicholas Marriott
Also remove some old debug output which was #if 0.
2009-06-24Change find-window and monitor-content to use fnmatch(3). For convenience andNicholas Marriott
compatibility, *s are implicitly added at the start and end of the pattern. Also display the line number and the entire line in the results, and lose the nasty section_string function and the now empty util.c file. Initially from Tiago Cunha.
2009-06-24Add a dedicated function to convert a line into a string and use it to ↵Nicholas Marriott
simplify the search window function.
2009-06-24Trying to predict the cursor position for UTF-8 output in the same way as forNicholas Marriott
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.
2009-06-24Constify utf8_width() function argument.Nicholas Marriott
2009-06-04Proper support for tab stops (\033H etc), using a bitstring(3). Makes anotherNicholas Marriott
vttest test happy.
2009-06-03Implement 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-03New session option, status-utf8, to control the interpretation of top-bit-setNicholas Marriott
characters in status-left and status-right (if on, they are treated as UTF-8; otherwise passed through).
2009-06-03Add a UTF-8 aware string length function and make UTF-8 inNicholas Marriott
status-left/status-right work properly. At the moment any top-bit-set characters are assumed to be UTF-8: a status-utf8 option to configure this will come shortly.
2009-06-03When swapping pane positions, swap the PANE_HIDDEN flag as well, otherwise tmuxNicholas Marriott
crashes when trying to find the new active pane. While here, nuke an unused pane flag. Fixes PR 6160, reported by and a slightly different version of diff tested by ralf.horstmann at gmx.de.
2009-06-01Import tmux, a terminal multiplexor allowing (among other things) a singleNicholas Marriott
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