summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/status.c
AgeCommit message (Collapse)Author
2019-05-28Redraw status line if size changes, GitHub issue 1762. Also fix lengthNicholas Marriott
of target buffer when pasting into status line.
2019-05-23Fix length calculation for pasting UTF-8 characters in the status line,Nicholas Marriott
GitHub issue 1753.
2019-05-11Do not reduce window height by status line height for control modeNicholas Marriott
clients, from George Nachman.
2019-05-03Fix reverse attribute in status line, GitHub issue 1709.Nicholas Marriott
2019-04-26Merge hooks into options and make each one an array option. This allowsNicholas Marriott
multiple commands to be easily bound to one hook. set-hook and show-hooks remain but they are now variants of set-option and show-options. show-options now has a -H flag to show hooks (by default they are not shown).
2019-04-25options_array_item_value cannot return NULL.Nicholas Marriott
2019-04-23Somehow missed these bits in last commit.Nicholas Marriott
2019-04-23Indicate an array option with a flag rather than a special type so thatNicholas Marriott
in future will not have to be strings.
2019-03-18Extend the #[] style syntax and use that together with previous formatNicholas Marriott
changes to allow the status line to be entirely configured with a single option. Now that it is possible to configure their content, enable the existing code that lets the status line be multiple lines in height. The status option can now take a value of 2, 3, 4 or 5 (as well as the previous on or off) to configure more than one line. The new status-format array option configures the format of each line, the default just references the existing status-* options, although some of the more obscure status options may be eliminated in time. Additions to the #[] syntax are: "align" to specify alignment (left, centre, right), "list" for the window list and "range" to configure ranges of text for the mouse bindings. The "align" keyword can also be used to specify alignment of entries in tree mode and the pane status lines.
2019-03-18Make array options a sparse tree instead of an array of char * andNicholas Marriott
remove the size limit.
2019-03-18With force, kill previous job before starting new. Fixes problemNicholas Marriott
reported by Scott Mcdermott in GitHub issue 1627.
2019-03-16Use a pointer for the active screen in the status line instead ofNicholas Marriott
copying them around all the time.
2019-03-16Give status_save_old the client so it can do the reinit too.Nicholas Marriott
2019-03-16Tidy and rename some bits of status line code.Nicholas Marriott
2019-03-15Move status line free into its own function.Nicholas Marriott
2019-03-14Store the time in the format tree rather than passing it around.Nicholas Marriott
2019-03-12DECRC and DECSC apparently need to preserve origin mode as well, basedNicholas Marriott
on a fix from Marc Reisner.
2019-02-09Completion of command-alias members.Nicholas Marriott
2018-10-18Support for windows larger than visible on the attached client. This hasNicholas Marriott
been a limitation for a long time. There are two new options, window-size and default-size, and a new command, resize-window. The force-width and force-height options and the session_width and session_height formats have been removed. The new window-size option tells tmux how to work out the size of windows: largest means it picks the size of the largest session, smallest the smallest session (similar to the old behaviour) and manual means that it does not automatically resize windows. The default is currently largest but this may change. aggressive-resize modifies the choice of session for largest and smallest as it did before. If a window is in a session attached to a client that is too small, only part of the window is shown. tmux attempts to keep the cursor visible, so the part of the window displayed is changed as the cursor moves (with a small delay, to try and avoid excess redrawing when applications redraw status lines or similar that are not currently visible). The offset of the visible portion of the window is shown in status-right. Drawing windows which are larger than the client is not as efficient as those which fit, particularly when the cursor moves, so it is recommended to avoid using this on slow machines or networks (set window-size to smallest or manual). The resize-window command can be used to resize a window manually. If it is used, the window-size option is automatically set to manual for the window (undo this with "setw -u window-size"). resize-window works in a similar way to resize-pane (-U -D -L -R -x -y flags) but also has -a and -A flags. -a sets the window to the size of the smallest client (what it would be if window-size was smallest) and -A the largest. For the same behaviour as force-width or force-height, use resize-window -x or -y, and "setw -u window-size" to revert to automatic sizing.. If the global window-size option is set to manual, the default-size option is used for new windows. If -x or -y is used with new-session, that sets the default-size option for the new session. The maximum size of a window is 10000x10000. But expect applications to complain and much higher memory use if making a window excessively big. The minimum size is the size required for the current layout including borders. The refresh-client command can be used to pan around a window, -U -D -L -R moves up, down, left or right and -c returns to automatic cursor tracking. The position is reset when the current window is changed.
2018-08-29Keep any text killed in the command prompt with C-w and yank it withNicholas Marriott
C-y, only use the top buffer if no text has previously been killed. This and previous change promped by discussion with kn@.
2018-08-29Add C-Left and C-Right as aliases for M-b and M-f.Nicholas Marriott
2018-08-22Add StatusLeft and StatusRight mouse key modifiers for the left andNicholas Marriott
right parts of the status line.
2018-08-20Move offset of window list into status struct.Nicholas Marriott
2018-08-19Add a client redraw-window flag instead of the redraw-all flag and forNicholas Marriott
all just use the three flags together (window, borders, status).
2018-02-22Remove an unused variable.Nicholas Marriott
2018-02-05Add struct status_line to hold status line members of struct client, notNicholas Marriott
used yet but will be soon. From Thomas Adam.
2018-01-01Add C-g at command prompt for emacs people, GitHub issue 1213.Nicholas Marriott
2017-12-27Draw command prompt correctly with status line off.Nicholas Marriott
2017-12-18Remove unused variable from Thomas Adam.Nicholas Marriott
2017-11-02Add a "fast" version of screen_write_copy for tree mode that doesn't doNicholas Marriott
all the checks and selection and marking stuff needed for copy mode.
2017-10-20Clear status line with spaces again so reverse works, spotted by sthen.Nicholas Marriott
2017-10-16Infrastructure for drawing status lines of more than one line in height,Nicholas Marriott
still only one is allowed but this lets tmux draw bigger ones.
2017-05-29Add a flag to stop the prompt input being expanded.Nicholas Marriott
2017-05-29Store a copy of the old status line, will be needed soon for new choose mode.Nicholas Marriott
2017-05-17Tidy command prompt callbacks and pass in the client.Nicholas Marriott
2017-05-03Add a format for the last search string in copy mode and fix the promptNicholas Marriott
so it can work when in -I, suggested by Suraj N Kurapati.
2017-05-01In order that people can use formats like #D in #() in the status lineNicholas Marriott
and not have to wait for an update when they change pane, we allow commands to run more than once a second if the expanded form changes. Unfortunately this can mean them being run far too often (pretty much continually) when multiple clients exist, because some formats (including #D) will always differ between clients. To avoid this, give each client its own tree of jobs which means that the same command will be different instances for each client - similar to how we have the tag to separate commands for different panes. GitHub issue 889; test case reported by Paul Johnson.
2017-04-22Memory leak from David CARLIER.Nicholas Marriott
2017-02-09Break the message storage function into its own function, useful forNicholas Marriott
debugging.
2017-02-03Cache status line position to reduce option lookups during output.Nicholas Marriott
2017-02-03Add a window or pane id "tag" to each format tree and use it to separateNicholas Marriott
jobs, this means that if the same job is used for different windows or panes (for example in pane-border-format), it will be run separately for each pane.
2017-01-13Make options_get_string return const string.Nicholas Marriott
2017-01-06Incremental search in copy mode (on for emacs keys by default) - muchNicholas Marriott
the same as normal searching but updates the cursor position and marked search terms as you type. C-r and C-s in the prompt repeat the search, once finished searching (with Enter), N and n work as before.
2017-01-05Highlight all occurrences of search string after searching in copy mode.Nicholas Marriott
2016-12-07Do not clear the prompt when a message is shown, just leave it around andNicholas Marriott
return to it when the message is finished.
2016-10-12Drop the edit mode key tables and just use fixed key bindings for theNicholas Marriott
command prompt.
2016-10-12The repeat prompt in both emacs and vi (and the old one in tmux) doesn'tNicholas Marriott
support line editing and instead executes a command as soon as a non-number key is pressed. Add a -N flag to command-prompt for the same in copy mode. Reported by Theo Buehler.
2016-10-11Fundamental change to how copy mode key bindings work:Nicholas Marriott
The vi-copy and emacs-copy mode key tables are gone, and instead copy mode commands are bound in one of two normal key tables ("copy-mode" or "copy-mode-vi"). Keys are bound to "send-keys -X copy-mode-command". So: bind -temacs-copy C-Up scroll-up bind -temacs-copy -R5 WheelUpPane scroll-up Becomes: bind -Tcopy-mode C-Up send -X scroll-up bind -Tcopy-mode WheelUpPane send -N5 -X scroll-up This allows the full command parser and command set to be used - for example, we can use the normal command prompt for searching, jumping, and so on instead of a custom one: bind -Tcopy-mode C-r command-prompt -p'search up' "send -X search-backward '%%'" command-prompt also gets a -1 option to only require on key press, which is needed for jumping. The plan is to get rid of mode keys entirely, so more to come eventually.
2016-10-11Support UTF-8 entry into the command prompt.Nicholas Marriott
2016-10-10Loads more static, except for cmd-*.c and window-*.c.Nicholas Marriott