OpenBSD CVS

CVS log for src/usr.bin/tmux/status.c


[BACK] Up to [local] / src / usr.bin / tmux

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.242 / (download) - annotate - [select for diffs], Wed May 15 08:39:30 2024 UTC (3 days, 21 hours ago) by nicm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.241: +21 -21 lines
Diff to previous 1.241 (colored)

Fix memory leaks reported by Lu Ming Yin.

Revision 1.241 / (download) - annotate - [select for diffs], Tue Nov 14 15:59:49 2023 UTC (6 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5
Changes since 1.240: +17 -8 lines
Diff to previous 1.240 (colored)

Handle NULL client (in config file) when showing a status message; also
copy the file when processing if-shell since it may be freed. GitHub
issue 3746.

Revision 1.240 / (download) - annotate - [select for diffs], Tue Aug 15 07:01:47 2023 UTC (9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.239: +5 -5 lines
Diff to previous 1.239 (colored)

Add an option menu-selected-style to configure the currently selected
menu item, from Alexis Hildebrandt.

Revision 1.239 / (download) - annotate - [select for diffs], Tue Aug 8 08:08:47 2023 UTC (9 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.238: +7 -5 lines
Diff to previous 1.238 (colored)

Add options and flags for menu styles similar to those existing for
popups, from Alexis Hildebrandt. GitHub issue 3650.

Revision 1.238 / (download) - annotate - [select for diffs], Mon Apr 17 18:22:24 2023 UTC (13 months ago) by nicm
Branch: MAIN
Changes since 1.237: +1 -3 lines
Diff to previous 1.237 (colored)

Ignore the user keys range when checking if a key is Unicode.

Revision 1.237 / (download) - annotate - [select for diffs], Fri Jan 20 21:36:00 2023 UTC (15 months, 4 weeks ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.236: +3 -3 lines
Diff to previous 1.236 (colored)

Add a flag to display-menu to select the manu item chosen first, GitHub
issue 3442.

Revision 1.236 / (download) - annotate - [select for diffs], Sat Sep 10 17:01:33 2022 UTC (20 months, 1 week ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.235: +2 -2 lines
Diff to previous 1.235 (colored)

Use correct option name.

Revision 1.235 / (download) - annotate - [select for diffs], Fri Sep 9 11:02:23 2022 UTC (20 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.234: +29 -10 lines
Diff to previous 1.234 (colored)

Add message-line option to control where message and prompt go, from
Varun Kumar E in GitHub issue 3324.

Revision 1.234 / (download) - annotate - [select for diffs], Mon May 30 13:07:46 2022 UTC (23 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.233: +27 -21 lines
Diff to previous 1.233 (colored)

Remove duplicates from completion list, GitHub issue 3178.

Revision 1.233 / (download) - annotate - [select for diffs], Mon Mar 7 11:52:09 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.232: +2 -2 lines
Diff to previous 1.232 (colored)

Pass client when adding menu item, GitHub issue 3103.

Revision 1.232 / (download) - annotate - [select for diffs], Thu Feb 3 10:07:11 2022 UTC (2 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.231: +3 -3 lines
Diff to previous 1.231 (colored)

Use format_draw for command prompt prefix to allow styles, GitHub issue
3054.

Revision 1.231 / (download) - annotate - [select for diffs], Mon Nov 15 10:58:13 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.230: +2 -1 lines
Diff to previous 1.230 (colored)

Leave the hardware cursor at the position of the selected line in choose
modes and current editing position and at the command prompt. It is
invisible but this is helpful for people using screen readers. GitHub
issue 2970.

Revision 1.230 / (download) - annotate - [select for diffs], Mon Nov 1 07:48:04 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.229: +2 -2 lines
Diff to previous 1.229 (colored)

Fix a comparison, from Ben Boeckel, and a crash when opening completion
menu, from Anindya Mukherjee.

Revision 1.229 / (download) - annotate - [select for diffs], Tue Oct 26 12:29:41 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.228: +14 -2 lines
Diff to previous 1.228 (colored)

Accept some emacs control keys in vi normal mode, from Alexis
Hildebrandt in GitHub issue 2922.

Revision 1.228 / (download) - annotate - [select for diffs], Tue Oct 26 12:22:23 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.227: +4 -3 lines
Diff to previous 1.227 (colored)

Do not allow inline styles to replace mode-style for the selected item,
from Alexis Hildebrandt in GitHub issue 2946.

Revision 1.227 / (download) - annotate - [select for diffs], Fri Aug 20 17:50:42 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.226: +3 -3 lines
Diff to previous 1.226 (colored)

Remove stray spaces after function names.

Revision 1.226 / (download) - annotate - [select for diffs], Thu Aug 12 20:09:34 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.225: +3 -3 lines
Diff to previous 1.225 (colored)

Use COLOUR_DEFAULT not hardcoded 8.

Revision 1.225 / (download) - annotate - [select for diffs], Thu Jun 10 07:56:47 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.224: +157 -52 lines
Diff to previous 1.224 (colored)

More accurate vi(1) word navigation in copy mode and on the status line.
This changes the meaning of the word-separators option - setting it to
the empty string is equivalent to the previous behavior. From Will Noble
in GitHub issue 2693.

Revision 1.224 / (download) - annotate - [select for diffs], Thu Jun 10 07:50:04 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.223: +136 -52 lines
Diff to previous 1.223 (colored)

Add different command historys for different types of prompts
("command", "search" etc). From Anindya Mukherjee.

Revision 1.223 / (download) - annotate - [select for diffs], Thu Jun 10 07:38:28 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.222: +2 -2 lines
Diff to previous 1.222 (colored)

Move "special" keys into the Unicode PUA rather than making them top bit
set, some compilers do not allow enums that are larger than int. GitHub
issue 2673.

Revision 1.222 / (download) - annotate - [select for diffs], Thu Jun 10 07:24:45 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.221: +3 -1 lines
Diff to previous 1.221 (colored)

Include current client in size calculation for new sessions, GitHub
issue 2662.

Revision 1.221 / (download) - annotate - [select for diffs], Mon Apr 12 09:36:12 2021 UTC (3 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.220: +6 -3 lines
Diff to previous 1.220 (colored)

Add a flag to disable keys to close a message, GitHub issue 2625.

Revision 1.220 / (download) - annotate - [select for diffs], Mon Feb 22 06:53:04 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.219: +8 -6 lines
Diff to previous 1.219 (colored)

Move jump commands to grid reader, make them UTF-8 aware, and tidy up,
from Anindya Mukherjee.

Revision 1.219 / (download) - annotate - [select for diffs], Fri Jan 8 08:22:10 2021 UTC (3 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.218: +32 -16 lines
Diff to previous 1.218 (colored)

With incremental search, start empty and only repeat the previous search
if the user tries to search again with an empty prompt. This matches
emacs behaviour more closely.

Revision 1.218 / (download) - annotate - [select for diffs], Mon Jul 27 08:03:10 2020 UTC (3 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.217: +10 -4 lines
Diff to previous 1.217 (colored)

Add a -d option to display-message to set delay, from theonekeyg at
gmail dot com in GitHub issue 2322.

Revision 1.217 / (download) - annotate - [select for diffs], Thu Jun 11 10:56:19 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.216: +18 -7 lines
Diff to previous 1.216 (colored)

Fix a crash when completing sessions, from Anindya Mukherjee.

Revision 1.216 / (download) - annotate - [select for diffs], Tue May 26 08:56:48 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.215: +2 -2 lines
Diff to previous 1.215 (colored)

Remove leftover debug logging and fix comparison.

Revision 1.215 / (download) - annotate - [select for diffs], Tue May 26 08:55:38 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.214: +5 -2 lines
Diff to previous 1.214 (colored)

Set up UTF-8 data for ASCII keys correctly.

Revision 1.214 / (download) - annotate - [select for diffs], Mon May 25 18:57:25 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.213: +2 -3 lines
Diff to previous 1.213 (colored)

Use the internal representation for UTF-8 keys instead of wchar_t and
drop some code only needed for that.

Revision 1.213 / (download) - annotate - [select for diffs], Sat May 16 16:35:13 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.212: +3 -3 lines
Diff to previous 1.212 (colored)

Separate key flags and modifiers, log key flags, make the "xterm" flag
more explicit and fix M- keys with a leading escape.

Revision 1.212 / (download) - annotate - [select for diffs], Sat May 16 16:33:16 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.211: +5 -5 lines
Diff to previous 1.211 (colored)

Rename KEYC_ESCAPE to KEYC_META.

Revision 1.211 / (download) - annotate - [select for diffs], Sat May 16 16:16:07 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.210: +8 -5 lines
Diff to previous 1.210 (colored)

Expand target from client and use it to expand the prompt.

Revision 1.210 / (download) - annotate - [select for diffs], Sat May 16 15:54:20 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.209: +7 -3 lines
Diff to previous 1.209 (colored)

Support embedded styles in the display-message message, GitHub issue
2206.

Revision 1.209 / (download) - annotate - [select for diffs], Sat May 16 15:47:22 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.208: +2 -2 lines
Diff to previous 1.208 (colored)

Change message log to be per server rather than per client and include
every command that is run.

Revision 1.208 / (download) - annotate - [select for diffs], Sat May 16 15:34:08 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.207: +4 -4 lines
Diff to previous 1.207 (colored)

Do not hoke into struct window_pane from the tty code and instead set
everything up in tty_ctx. Provide a way to initialize the tty_ctx from a
callback and use it to let popups draw directly through input_parse in
the same way as panes do, rather than forcing a full redraw on every
change.

Revision 1.207 / (download) - annotate - [select for diffs], Sat May 16 15:19:04 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.206: +18 -12 lines
Diff to previous 1.206 (colored)

Use formats for status-style and message-style.

Revision 1.206 / (download) - annotate - [select for diffs], Sat May 16 15:18:17 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.205: +30 -17 lines
Diff to previous 1.205 (colored)

Complete partial window indexes properly.

Revision 1.205 / (download) - annotate - [select for diffs], Sat May 16 15:16:36 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.204: +77 -37 lines
Diff to previous 1.204 (colored)

Add -W and -T flags to command-prompt to only complete a window and a
target, also complete aliases.

Revision 1.204 / (download) - annotate - [select for diffs], Sat May 16 15:06:03 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.203: +329 -174 lines
Diff to previous 1.203 (colored)

Improve command prompt completion:

- Show a menu with completions if there are multiple.

- Don't complete argument stuff (options, layouts) at start of text.

- For -t and -s, if there is no : then complete sessions but if there is
  a :, show a menu of all windows in the session rather than trying to
  complete the window name which is a bit useless if there are
  duplicates.

Revision 1.203 / (download) - annotate - [select for diffs], Sat May 16 15:01:31 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.202: +12 -6 lines
Diff to previous 1.202 (colored)

Drop having a separate type for style options and make them all strings,
which allows formats to be expanded. Any styles without a '#{' are still
validated when they are set but any with a '#{' are not. Formats are not
expanded usefully in many cases yet, that will be changed later.

To make this work, a few other changes:

- set-option -a with a style option automatically appends a ",".

- OSC 10 and 11 don't set the window-style option anymore, instead the
  fg and bg are stored in the pane struct and act as the defaults that
  can be overridden by window-style.

- status-fg and -bg now override status-style instead of trying to keep
  them in sync.

Revision 1.202 / (download) - annotate - [select for diffs], Thu Mar 12 09:49:43 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.201: +5 -1 lines
Diff to previous 1.201 (colored)

Add C-g to cancel command prompt with vi(1) keys as well as emacs, and q
in command mode.

Revision 1.201 / (download) - annotate - [select for diffs], Mon Jan 27 08:53:13 2020 UTC (4 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.200: +8 -2 lines
Diff to previous 1.200 (colored)

Add support for adding a note to a key binding (with bind-key -N) and
use this to add descriptions to the default key bindings. A new -N flag
to list-keys shows key bindings with notes rather than the default
bind-key command used to create them. Change the default ? binding to
use this to show a readable summary of keys.

Also extend command-prompt to return the name of the key pressed and add
a default binding (/) to show the note for the next key pressed

Suggested by Alex Tremblay in GitHub issue 2000.

Revision 1.200 / (download) - annotate - [select for diffs], Tue May 28 18:53:36 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.199: +3 -5 lines
Diff to previous 1.199 (colored)

Redraw status line if size changes, GitHub issue 1762. Also fix length
of target buffer when pasting into status line.

Revision 1.199 / (download) - annotate - [select for diffs], Thu May 23 12:47:52 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.198: +71 -42 lines
Diff to previous 1.198 (colored)

Fix length calculation for pasting UTF-8 characters in the status line,
GitHub issue 1753.

Revision 1.198 / (download) - annotate - [select for diffs], Sat May 11 06:34:56 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.197: +3 -3 lines
Diff to previous 1.197 (colored)

Do not reduce window height by status line height for control mode
clients, from George Nachman.

Revision 1.197 / (download) - annotate - [select for diffs], Fri May 3 10:00:48 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.196: +12 -7 lines
Diff to previous 1.196 (colored)

Fix reverse attribute in status line, GitHub issue 1709.

Revision 1.196 / (download) - annotate - [select for diffs], Fri Apr 26 11:38:51 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.195: +2 -2 lines
Diff to previous 1.195 (colored)

Merge hooks into options and make each one an array option. This allows
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).

Revision 1.195 / (download) - annotate - [select for diffs], Thu Apr 25 19:36:59 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.194: +2 -7 lines
Diff to previous 1.194 (colored)

options_array_item_value cannot return NULL.

Revision 1.194 / (download) - annotate - [select for diffs], Tue Apr 23 20:40:03 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.193: +7 -3 lines
Diff to previous 1.193 (colored)

Somehow missed these bits in last commit.

Revision 1.193 / (download) - annotate - [select for diffs], Tue Apr 23 20:36:55 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.192: +5 -5 lines
Diff to previous 1.192 (colored)

Indicate an array option with a flag rather than a special type so that
in future will not have to be strings.

Revision 1.192 / (download) - annotate - [select for diffs], Mon Mar 18 20:53:33 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.191: +105 -326 lines
Diff to previous 1.191 (colored)

Extend the #[] style syntax and use that together with previous format
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.

Revision 1.191 / (download) - annotate - [select for diffs], Mon Mar 18 11:58:40 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.190: +14 -7 lines
Diff to previous 1.190 (colored)

Make array options a sparse tree instead of an array of char * and
remove the size limit.

Revision 1.190 / (download) - annotate - [select for diffs], Mon Mar 18 09:46:42 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.189: +2 -2 lines
Diff to previous 1.189 (colored)

With force, kill previous job before starting new. Fixes problem
reported by Scott Mcdermott in GitHub issue 1627.

Revision 1.189 / (download) - annotate - [select for diffs], Sat Mar 16 19:12:13 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.188: +70 -71 lines
Diff to previous 1.188 (colored)

Use a pointer for the active screen in the status line instead of
copying them around all the time.

Revision 1.188 / (download) - annotate - [select for diffs], Sat Mar 16 17:53:55 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.187: +11 -10 lines
Diff to previous 1.187 (colored)

Give status_save_old the client so it can do the reinit too.

Revision 1.187 / (download) - annotate - [select for diffs], Sat Mar 16 17:14:07 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.186: +66 -47 lines
Diff to previous 1.186 (colored)

Tidy and rename some bits of status line code.

Revision 1.186 / (download) - annotate - [select for diffs], Fri Mar 15 14:46:58 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.185: +18 -2 lines
Diff to previous 1.185 (colored)

Move status line free into its own function.

Revision 1.185 / (download) - annotate - [select for diffs], Thu Mar 14 23:14:27 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.184: +23 -34 lines
Diff to previous 1.184 (colored)

Store the time in the format tree rather than passing it around.

Revision 1.184 / (download) - annotate - [select for diffs], Tue Mar 12 20:02:47 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.183: +10 -10 lines
Diff to previous 1.183 (colored)

DECRC and DECSC apparently need to preserve origin mode as well, based
on a fix from Marc Reisner.

Revision 1.183 / (download) - annotate - [select for diffs], Sat Feb 9 18:18:36 2019 UTC (5 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.182: +35 -13 lines
Diff to previous 1.182 (colored)

Completion of command-alias members.

Revision 1.182 / (download) - annotate - [select for diffs], Thu Oct 18 08:38:01 2018 UTC (5 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.181: +11 -11 lines
Diff to previous 1.181 (colored)

Support for windows larger than visible on the attached client. This has
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.

Revision 1.181 / (download) - annotate - [select for diffs], Wed Aug 29 09:50:32 2018 UTC (5 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.180: +31 -15 lines
Diff to previous 1.180 (colored)

Keep any text killed in the command prompt with C-w and yank it with
C-y, only use the top buffer if no text has previously been killed. This
and previous change promped by discussion with kn@.

Revision 1.180 / (download) - annotate - [select for diffs], Wed Aug 29 08:56:51 2018 UTC (5 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.179: +4 -1 lines
Diff to previous 1.179 (colored)

Add C-Left and C-Right as aliases for M-b and M-f.

Revision 1.179 / (download) - annotate - [select for diffs], Wed Aug 22 20:06:14 2018 UTC (5 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.178: +5 -1 lines
Diff to previous 1.178 (colored)

Add StatusLeft and StatusRight mouse key modifiers for the left and
right parts of the status line.

Revision 1.178 / (download) - annotate - [select for diffs], Mon Aug 20 20:41:58 2018 UTC (5 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.177: +3 -3 lines
Diff to previous 1.177 (colored)

Move offset of window list into status struct.

Revision 1.177 / (download) - annotate - [select for diffs], Sun Aug 19 16:45:03 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.176: +13 -13 lines
Diff to previous 1.176 (colored)

Add a client redraw-window flag instead of the redraw-all flag and for
all just use the three flags together (window, borders, status).

Revision 1.176 / (download) - annotate - [select for diffs], Thu Feb 22 11:42:41 2018 UTC (6 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.175: +1 -6 lines
Diff to previous 1.175 (colored)

Remove an unused variable.

Revision 1.175 / (download) - annotate - [select for diffs], Mon Feb 5 08:21:54 2018 UTC (6 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.174: +39 -36 lines
Diff to previous 1.174 (colored)

Add struct status_line to hold status line members of struct client, not
used yet but will be soon. From Thomas Adam.

Revision 1.174 / (download) - annotate - [select for diffs], Mon Jan 1 11:03:54 2018 UTC (6 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.173: +2 -1 lines
Diff to previous 1.173 (colored)

Add C-g at command prompt for emacs people, GitHub issue 1213.

Revision 1.173 / (download) - annotate - [select for diffs], Wed Dec 27 13:55:42 2017 UTC (6 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.172: +7 -5 lines
Diff to previous 1.172 (colored)

Draw command prompt correctly with status line off.

Revision 1.172 / (download) - annotate - [select for diffs], Mon Dec 18 12:39:34 2017 UTC (6 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.171: +2 -3 lines
Diff to previous 1.171 (colored)

Remove unused variable from Thomas Adam.

Revision 1.171 / (download) - annotate - [select for diffs], Thu Nov 2 21:29:17 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.170: +2 -3 lines
Diff to previous 1.170 (colored)

Add a "fast" version of screen_write_copy for tree mode that doesn't do
all the checks and selection and marking stuff needed for copy mode.

Revision 1.170 / (download) - annotate - [select for diffs], Fri Oct 20 13:10:54 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.169: +12 -7 lines
Diff to previous 1.169 (colored)

Clear status line with spaces again so reverse works, spotted by sthen.

Revision 1.169 / (download) - annotate - [select for diffs], Mon Oct 16 19:30:53 2017 UTC (6 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.168: +49 -20 lines
Diff to previous 1.168 (colored)

Infrastructure for drawing status lines of more than one line in height,
still only one is allowed but this lets tmux draw bigger ones.

Revision 1.168 / (download) - annotate - [select for diffs], Mon May 29 20:42:53 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.167: +8 -3 lines
Diff to previous 1.167 (colored)

Add a flag to stop the prompt input being expanded.

Revision 1.167 / (download) - annotate - [select for diffs], Mon May 29 20:41:29 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.166: +20 -1 lines
Diff to previous 1.166 (colored)

Store a copy of the old status line, will be needed soon for new choose mode.

Revision 1.166 / (download) - annotate - [select for diffs], Wed May 17 15:20:23 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.165: +12 -13 lines
Diff to previous 1.165 (colored)

Tidy command prompt callbacks and pass in the client.

Revision 1.165 / (download) - annotate - [select for diffs], Wed May 3 05:53:34 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.164: +8 -2 lines
Diff to previous 1.164 (colored)

Add a format for the last search string in copy mode and fix the prompt
so it can work when in -I, suggested by Suraj N Kurapati.

Revision 1.164 / (download) - annotate - [select for diffs], Mon May 1 12:20:55 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.163: +5 -5 lines
Diff to previous 1.163 (colored)

In order that people can use formats like #D in #() in the status line
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.

Revision 1.163 / (download) - annotate - [select for diffs], Sat Apr 22 12:55:06 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.162: +2 -1 lines
Diff to previous 1.162 (colored)

Memory leak from David CARLIER.

Revision 1.162 / (download) - annotate - [select for diffs], Thu Feb 9 12:09:33 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.161: +5 -21 lines
Diff to previous 1.161 (colored)

Break the message storage function into its own function, useful for
debugging.

Revision 1.161 / (download) - annotate - [select for diffs], Fri Feb 3 21:01:02 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.160: +15 -6 lines
Diff to previous 1.160 (colored)

Cache status line position to reduce option lookups during output.

Revision 1.160 / (download) - annotate - [select for diffs], Fri Feb 3 11:57:27 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.159: +10 -5 lines
Diff to previous 1.159 (colored)

Add a window or pane id "tag" to each format tree and use it to separate
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.

Revision 1.159 / (download) - annotate - [select for diffs], Fri Jan 13 11:56:43 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.158: +14 -13 lines
Diff to previous 1.158 (colored)

Make options_get_string return const string.

Revision 1.158 / (download) - annotate - [select for diffs], Fri Jan 6 11:57:03 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.157: +50 -34 lines
Diff to previous 1.157 (colored)

Incremental search in copy mode (on for emacs keys by default) - much
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.

Revision 1.157 / (download) - annotate - [select for diffs], Thu Jan 5 09:07:16 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.156: +3 -2 lines
Diff to previous 1.156 (colored)

Highlight all occurrences of search string after searching in copy mode.

Revision 1.156 / (download) - annotate - [select for diffs], Wed Dec 7 23:03:04 2016 UTC (7 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.155: +3 -3 lines
Diff to previous 1.155 (colored)

Do not clear the prompt when a message is shown, just leave it around and
return to it when the message is finished.

Revision 1.155 / (download) - annotate - [select for diffs], Wed Oct 12 14:50:14 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.154: +169 -80 lines
Diff to previous 1.154 (colored)

Drop the edit mode key tables and just use fixed key bindings for the
command prompt.

Revision 1.154 / (download) - annotate - [select for diffs], Wed Oct 12 13:03:27 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.153: +46 -32 lines
Diff to previous 1.153 (colored)

The repeat prompt in both emacs and vi (and the old one in tmux) doesn't
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.

Revision 1.153 / (download) - annotate - [select for diffs], Tue Oct 11 07:23:34 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.152: +2 -2 lines
Diff to previous 1.152 (colored)

Fundamental change to how copy mode key bindings work:

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.

Revision 1.152 / (download) - annotate - [select for diffs], Tue Oct 11 07:11:40 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.151: +201 -117 lines
Diff to previous 1.151 (colored)

Support UTF-8 entry into the command prompt.

Revision 1.151 / (download) - annotate - [select for diffs], Mon Oct 10 21:29:23 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.150: +35 -35 lines
Diff to previous 1.150 (colored)

Loads more static, except for cmd-*.c and window-*.c.

Revision 1.150 / (download) - annotate - [select for diffs], Mon Sep 12 15:40:58 2016 UTC (7 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.149: +2 -2 lines
Diff to previous 1.149 (colored)

Allow repeat count to be specified in mode key tables with bind-key -R,
and set the default repeat count to 5 for WheelUp and WheelDown in
copy-mode.

Revision 1.149 / (download) - annotate - [select for diffs], Mon Jun 6 07:23:36 2016 UTC (7 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.148: +9 -6 lines
Diff to previous 1.148 (colored)

Allow #[] in window-status-separator.

Revision 1.148 / (download) - annotate - [select for diffs], Tue Jan 19 15:59:12 2016 UTC (8 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.147: +2 -2 lines
Diff to previous 1.147 (colored)

I no longer use my SourceForge address so replace it.

Revision 1.147 / (download) - annotate - [select for diffs], Fri Jan 1 08:04:20 2016 UTC (8 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.146: +4 -5 lines
Diff to previous 1.146 (colored)

Don't rely on a calculation wrapping when applying message-limit, and
break out of the loop early. From Nicolas Viennot.

Revision 1.146 / (download) - annotate - [select for diffs], Fri Dec 11 16:37:21 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.145: +3 -3 lines
Diff to previous 1.145 (colored)

Style nits and line wrapping of function declarations.

Revision 1.145 / (download) - annotate - [select for diffs], Fri Dec 11 12:27:36 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.144: +5 -5 lines
Diff to previous 1.144 (colored)

Add cmdq as an argument to format_create and add a format for the
command name (will also be used for more later).

Revision 1.144 / (download) - annotate - [select for diffs], Tue Dec 8 08:34:18 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.143: +5 -5 lines
Diff to previous 1.143 (colored)

Remove format_create_flags and just pass flags to format_create.

Revision 1.143 / (download) - annotate - [select for diffs], Sun Nov 22 18:28:01 2015 UTC (8 years, 5 months ago) by tim
Branch: MAIN
Changes since 1.142: +10 -8 lines
Diff to previous 1.142 (colored)

If display-time is set to 0, show status messages until a key is pressed;
OK nicm@

Revision 1.142 / (download) - annotate - [select for diffs], Fri Nov 20 12:01:19 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.141: +2 -14 lines
Diff to previous 1.141 (colored)

Instead of separate tables for different types of options, give each
option a scope type (server, session, window) in one table.

Revision 1.141 / (download) - annotate - [select for diffs], Wed Nov 18 14:27:44 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.140: +3 -3 lines
Diff to previous 1.140 (colored)

Use __unused rather than rolling our own.

Revision 1.140 / (download) - annotate - [select for diffs], Fri Nov 13 08:09:28 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.139: +5 -4 lines
Diff to previous 1.139 (colored)

Long overdue change to the way we store cells in the grid: now, instead
of storing a full grid_cell with UTF-8 data and everything, store a new
type grid_cell_entry. This can either be the cell itself (for ASCII
cells), or an offset into an extended array (per line) for UTF-8
data.

This avoid a large (8 byte) overhead on non-UTF-8 cells (by far the
majority for most users) without the complexity of the shadow array we
had before. Grid memory without any UTF-8 is about half.

The disadvantage that cells can no longer be modified in place and need
to be copied out of the grid and back but it turned out to be lot less
complicated than I expected.

Revision 1.139 / (download) - annotate - [select for diffs], Thu Nov 12 11:09:11 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.138: +27 -37 lines
Diff to previous 1.138 (colored)

Nuke the utf8 and status-utf8 options and make tmux only a UTF-8
terminal. We still support non-UTF-8 terminals outside tmux, but inside
it is always UTF-8 (as when the utf8 and status-utf8 options were on).

Revision 1.138 / (download) - annotate - [select for diffs], Thu Nov 12 11:05:34 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.137: +3 -3 lines
Diff to previous 1.137 (colored)

Support UTF-8 key bindings by expanding the key type from int to
uint64_t and converting UTF-8 to Unicode on input and the reverse on
output. (This allows key bindings, there are still omissions - the
largest being that the various prompts do not accept UTF-8.)

Revision 1.137 / (download) - annotate - [select for diffs], Tue Oct 27 15:58:42 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.136: +29 -29 lines
Diff to previous 1.136 (colored)

Move struct options into options.c.

Revision 1.136 / (download) - annotate - [select for diffs], Tue Oct 20 21:12:09 2015 UTC (8 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.135: +2 -2 lines
Diff to previous 1.135 (colored)

Use client pointer not file descriptor in logging.

Revision 1.135 / (download) - annotate - [select for diffs], Mon Sep 14 10:25:52 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.134: +5 -2 lines
Diff to previous 1.134 (colored)

Make refresh-client force update of jobs, from Sina Siadat.

Revision 1.134 / (download) - annotate - [select for diffs], Sat Aug 29 09:25:00 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.133: +9 -9 lines
Diff to previous 1.133 (colored)

Move struct paste_buffer out of tmux.h.

Revision 1.133 / (download) - annotate - [select for diffs], Fri Aug 28 12:16:28 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.132: +53 -5 lines
Diff to previous 1.132 (colored)

Run status update on a per-client timer at status-interval.

Revision 1.132 / (download) - annotate - [select for diffs], Wed Jul 29 11:56:02 2015 UTC (8 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.131: +1 -11 lines
Diff to previous 1.131 (colored)

status_out and associated data structures are no longer used.

Revision 1.131 / (download) - annotate - [select for diffs], Tue Jul 28 15:18:10 2015 UTC (8 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.130: +1 -2 lines
Diff to previous 1.130 (colored)

Tidy up the way terminals are described and move some structs out of tmux.h.

Revision 1.130 / (download) - annotate - [select for diffs], Mon Jul 20 15:50:04 2015 UTC (8 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.129: +92 -1 lines
Diff to previous 1.129 (colored)

Add an option (history-file) for a file to save/restore command prompt
history, from Olof-Joachim Frahm.

Revision 1.129 / (download) - annotate - [select for diffs], Wed May 27 13:28:04 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.128: +6 -230 lines
Diff to previous 1.128 (colored)

Move the jobs output cache into the formats code so that #() work more
generally (for example, again working in set-titles-string).

Revision 1.128 / (download) - annotate - [select for diffs], Wed May 6 23:56:46 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.127: +198 -72 lines
Diff to previous 1.127 (colored)

Remove ARRAY_* from history and expand completion to complete a) layout
names and b) targets beginning with -t or -s.

Revision 1.127 / (download) - annotate - [select for diffs], Sat Apr 25 18:33:59 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.126: +15 -13 lines
Diff to previous 1.126 (colored)

Make message log a TAILQ.

Revision 1.126 / (download) - annotate - [select for diffs], Fri Apr 24 22:19:36 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.125: +2 -2 lines
Diff to previous 1.125 (colored)

Set working directory for run-shell and if-shell.

Revision 1.125 / (download) - annotate - [select for diffs], Sun Apr 19 21:34:21 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.124: +8 -7 lines
Diff to previous 1.124 (colored)

Rewrite of tmux mouse support which was a mess. Instead of having
options for "mouse-this" and "mouse-that", mouse events may be bound as
keys and there is one option "mouse" that turns on mouse support
entirely (set -g mouse on).

See the new MOUSE SUPPORT section of the man page for description of the
key names and new flags (-t= to specify the pane or window under mouse
as a target, and send-keys -M to pass through a mouse event).

The default builtin bindings for the mouse are:

    bind -n   MouseDown1Pane select-pane -t=; send-keys -M
    bind -n MouseDown1Status select-window -t=
    bind -n   MouseDrag1Pane copy-mode -M
    bind -n MouseDrag1Border resize-pane -M

To get the effect of turning mode-mouse off, do:

    unbind -n MouseDrag1Pane
    unbind -temacs-copy MouseDrag1Pane

The old mouse options are now gone, set-option -q may be used to
suppress warnings if mixing configuration files.

Revision 1.124 / (download) - annotate - [select for diffs], Fri Feb 6 23:28:52 2015 UTC (9 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.123: +5 -5 lines
Diff to previous 1.123 (colored)

Use the same time for both calls to format_expand_time.

Revision 1.123 / (download) - annotate - [select for diffs], Fri Feb 6 17:21:08 2015 UTC (9 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.122: +16 -29 lines
Diff to previous 1.122 (colored)

status_replace can now become local to status.c and it no longer needs
the jobsflag argument. While here there is no need to repeat work that
format_defaults already does.

Revision 1.122 / (download) - annotate - [select for diffs], Fri Feb 6 17:11:39 2015 UTC (9 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.121: +23 -6 lines
Diff to previous 1.121 (colored)

Add format_expand_time and use it instead of status_replace where
command execution is not needed.

Revision 1.121 / (download) - annotate - [select for diffs], Thu Feb 5 10:29:43 2015 UTC (9 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.120: +2 -9 lines
Diff to previous 1.120 (colored)

Wrap all the individual format_* calls in a single format_defaults
functions.

Revision 1.120 / (download) - annotate - [select for diffs], Sun Feb 1 23:43:23 2015 UTC (9 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.119: +24 -24 lines
Diff to previous 1.119 (colored)

Remove two unused arguments from status_replace.

Revision 1.119 / (download) - annotate - [select for diffs], Tue Jan 20 10:57:10 2015 UTC (9 years, 4 months ago) by sthen
Branch: MAIN
Changes since 1.118: +2 -2 lines
Diff to previous 1.118 (colored)

typo in comment ;)  ok nicm

Revision 1.118 / (download) - annotate - [select for diffs], Wed Nov 5 23:15:11 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.117: +8 -12 lines
Diff to previous 1.117 (colored)

Do not put a space between status-left/status-right and the window list,
instead move the space into the defaults for the options (so status-left
now defaults to "[#S] ". From Balazs Kezes.

Revision 1.117 / (download) - annotate - [select for diffs], Mon Oct 20 23:57:14 2014 UTC (9 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.116: +2 -2 lines
Diff to previous 1.116 (colored)

Better format for printf format attributes.

Revision 1.116 / (download) - annotate - [select for diffs], Wed Oct 8 17:35:58 2014 UTC (9 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.115: +4 -4 lines
Diff to previous 1.115 (colored)

Add xreallocarray and remove nmemb argument from xrealloc.

Revision 1.115 / (download) - annotate - [select for diffs], Thu Oct 2 10:39:43 2014 UTC (9 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.114: +7 -2 lines
Diff to previous 1.114 (colored)

Take account of window-status-separator when checking window position,
based on diff from Balazs Kezes.

Revision 1.114 / (download) - annotate - [select for diffs], Thu Apr 24 09:14:43 2014 UTC (10 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.113: +2 -2 lines
Diff to previous 1.113 (colored)

There is no longer a need for a paste_stack struct or for global_buffers
to be global. Move to paste.c.

Revision 1.113 / (download) - annotate - [select for diffs], Thu Apr 17 07:36:45 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.112: +1 -3 lines
Diff to previous 1.112 (colored)

Remove the monitor-content option and associated bits and bobs. It's
never worked very well. If there is a big demand for it to return, will
consider better ways to do it.

Revision 1.112 / (download) - annotate - [select for diffs], Wed Apr 2 17:08:23 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.111: +1 -4 lines
Diff to previous 1.111 (colored)

Do not replace ## with # in status_replace1 because it'll be done later
by the format code.

Revision 1.111 / (download) - annotate - [select for diffs], Mon Mar 31 21:41:35 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.110: +2 -6 lines
Diff to previous 1.110 (colored)

Make message-limit a server option.

Revision 1.110 / (download) - annotate - [select for diffs], Fri Feb 14 13:59:01 2014 UTC (10 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.109: +2 -2 lines
Diff to previous 1.109 (colored)

Style nit - no space between function name and bracket.

Revision 1.109 / (download) - annotate - [select for diffs], Fri Feb 14 12:37:54 2014 UTC (10 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.108: +12 -8 lines
Diff to previous 1.108 (colored)

Check for NULL session and whatnot in status_replace, from Thomas Adam.

Revision 1.108 / (download) - annotate - [select for diffs], Tue Jan 28 23:07:09 2014 UTC (10 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.107: +20 -102 lines
Diff to previous 1.107 (colored)

Allow replacing each of the many sets of separate foo-{fg,bg,attr}
options with a single foo-style option. For example:

    set -g status-fg yellow
    set -g status-bg red
    set -g status-attr blink

Becomes:

    set -g status-style fg=yellow,bg=red,blink

The -a flag to set can be used to add to rather than replace a style. So:

    set -g status-bg red

Becomes:

    set -ag status-style bg=red

Currently this is fully backwards compatible (all *-{fg,bg,attr} options
remain) but the plan is to deprecate them over time.

From Tiago Cunha.

Revision 1.107 / (download) - annotate - [select for diffs], Fri Jul 5 14:44:06 2013 UTC (10 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.106: +2 -4 lines
Diff to previous 1.106 (colored)

Whitespace nits, from Ben Boeckel.

Revision 1.106 / (download) - annotate - [select for diffs], Fri Jul 5 14:41:36 2013 UTC (10 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.105: +7 -1 lines
Diff to previous 1.105 (colored)

Act like vi(1) when moving words, from Ben Boeckel.

Revision 1.105 / (download) - annotate - [select for diffs], Fri Jul 5 14:38:22 2013 UTC (10 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.104: +4 -1 lines
Diff to previous 1.104 (colored)

Implement s, S, C mode switch commands in vi(1) mode, from Ben Boeckel.

Revision 1.104 / (download) - annotate - [select for diffs], Fri May 31 19:56:05 2013 UTC (10 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.103: +10 -53 lines
Diff to previous 1.103 (colored)

Demote the old single-character replacement variables (#S and friends)
to aliases of formats. From Tiago Cunha.

Revision 1.103 / (download) - annotate - [select for diffs], Mon Mar 25 11:43:01 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.102: +2 -2 lines
Diff to previous 1.102 (colored)

Extend jobs to support writing and use that for copy-pipe instead of
popen, from Chris Johnsen.

Revision 1.102 / (download) - annotate - [select for diffs], Fri Mar 22 15:55:22 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.101: +2 -2 lines
Diff to previous 1.101 (colored)

evbuffer_readline returns allocated storage, don't leak it.

Revision 1.101 / (download) - annotate - [select for diffs], Fri Mar 22 15:52:40 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.100: +2 -2 lines
Diff to previous 1.100 (colored)

Add copy-pipe mode command to copy selection and also pipe to a command.

Revision 1.100 / (download) - annotate - [select for diffs], Fri Mar 22 10:31:22 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.99: +1 -2 lines
Diff to previous 1.99 (colored)

No more lint means no more ARGSUSED.

Revision 1.99 / (download) - annotate - [select for diffs], Thu Mar 21 16:25:08 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.98: +4 -4 lines
Diff to previous 1.98 (colored)

Aargh. Spaces -> tabs.

Revision 1.98 / (download) - annotate - [select for diffs], Thu Mar 21 16:24:03 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.97: +5 -3 lines
Diff to previous 1.97 (colored)

Do not leak formats in status_replace.

Revision 1.97 / (download) - annotate - [select for diffs], Thu Mar 21 16:14:09 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.96: +3 -3 lines
Diff to previous 1.96 (colored)

Add a format client_prefix which is 1 if prefix key has been
pressed, used for example #{?client_prefix,X,Y}. Also a few extra
server_client_status needed.

Revision 1.96 / (download) - annotate - [select for diffs], Thu Mar 21 16:13:24 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.95: +20 -12 lines
Diff to previous 1.95 (colored)

Allow formats in status options.

Revision 1.95 / (download) - annotate - [select for diffs], Tue Nov 27 13:52:23 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.94: +12 -1 lines
Diff to previous 1.94 (colored)

Add window-status-last-* options, from Boris Faure.

Revision 1.94 / (download) - annotate - [select for diffs], Tue Jul 10 11:53:01 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.93: +21 -26 lines
Diff to previous 1.93 (colored)

xfree is not particularly helpful, remove it. From Thomas Adam.

Revision 1.93 / (download) - annotate - [select for diffs], Mon Jul 9 09:55:57 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.92: +4 -5 lines
Diff to previous 1.92 (colored)

Move a NULL check inside a function, from Tiago Cunha.

Revision 1.92 / (download) - annotate - [select for diffs], Sun Apr 29 07:33:41 2012 UTC (12 years ago) by nicm
Branch: MAIN
Changes since 1.91: +4 -4 lines
Diff to previous 1.91 (colored)

Use int not u_char for colours from options since they may have bit 8
set to mark them as 256-colour. Reported by Chris Johnson.

Revision 1.91 / (download) - annotate - [select for diffs], Mon Apr 23 22:23:14 2012 UTC (12 years ago) by nicm
Branch: MAIN
Changes since 1.90: +13 -5 lines
Diff to previous 1.90 (colored)

Add window-status-separator option, from Thomas Adam.

Revision 1.90 / (download) - annotate - [select for diffs], Sat Mar 17 18:24:07 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.89: +3 -2 lines
Diff to previous 1.89 (colored)

Check event_initialized before event_del if event may not have been set
up; libevent2 complains about this. Reported by Moriyoshi Koizumi.

Revision 1.89 / (download) - annotate - [select for diffs], Sun Mar 4 07:38:11 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.88: +7 -1 lines
Diff to previous 1.88 (colored)

Add A and I keys for vi status line editing.

Revision 1.88 / (download) - annotate - [select for diffs], Sat Mar 3 08:55:56 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.87: +3 -3 lines
Diff to previous 1.87 (colored)

The wlmouse offset should be part of the client, not the server. From
Ailin Nemui.

Revision 1.87 / (download) - annotate - [select for diffs], Sun Jan 29 09:37:02 2012 UTC (12 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.86: +15 -1 lines
Diff to previous 1.86 (colored)

Add an option to move the status line to the top of the screen,
requested by many.

Revision 1.86 / (download) - annotate - [select for diffs], Thu Jan 26 09:05:54 2012 UTC (12 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.85: +4 -3 lines
Diff to previous 1.85 (colored)

Terminate strftime buffer properly even if a really long format string
is given, from Tiago Cunha.

Revision 1.85 / (download) - annotate - [select for diffs], Thu Jan 26 09:03:09 2012 UTC (12 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.84: +3 -2 lines
Diff to previous 1.84 (colored)

Fix memory leak in error path, from Tiago Cunha.

Revision 1.84 / (download) - annotate - [select for diffs], Fri Jan 20 19:51:28 2012 UTC (12 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.83: +25 -5 lines
Diff to previous 1.83 (colored)

Add some trivial additional status line attributes from jwcxz at users
dot sourceforge dot net.

Revision 1.83 / (download) - annotate - [select for diffs], Fri Jan 20 19:10:29 2012 UTC (12 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.82: +17 -5 lines
Diff to previous 1.82 (colored)

Add space movement keys for vi mode in the status line from Ben Boeckel.

Revision 1.82 / (download) - annotate - [select for diffs], Thu Dec 1 20:42:31 2011 UTC (12 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.81: +2 -5 lines
Diff to previous 1.81 (colored)

Make M-f and M-b work the same at the command prompt as in copy mode,
pointed out by Romain Francoise.

Revision 1.81 / (download) - annotate - [select for diffs], Tue Nov 15 23:34:12 2011 UTC (12 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.80: +99 -4 lines
Diff to previous 1.80 (colored)

Add word movement and editing command for command prompt editing, from
Ben Boeckel.

Revision 1.80 / (download) - annotate - [select for diffs], Tue Nov 15 23:19:51 2011 UTC (12 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.79: +5 -2 lines
Diff to previous 1.79 (colored)

Make window_pane_index work the same as window_index, from Ben Boeckel.

Revision 1.79 / (download) - annotate - [select for diffs], Sat Nov 5 09:06:31 2011 UTC (12 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.78: +16 -4 lines
Diff to previous 1.78 (colored)

Option to change status line (message) background when using vi keys and
in command mode. From Ben Boeckel.

Revision 1.78 / (download) - annotate - [select for diffs], Sat Aug 20 20:37:31 2011 UTC (12 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.77: +4 -2 lines
Diff to previous 1.77 (colored)

Fix a couple of memory leaks, from marcel partap.

Revision 1.77 / (download) - annotate - [select for diffs], Fri Jul 8 06:37:57 2011 UTC (12 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.76: +13 -11 lines
Diff to previous 1.76 (colored)

Make confirm-before prompt customizable with -p option like
command-prompt. Also move responsibility for calling status_replace into
status_prompt_{set,update} and add #W and #P to the default kill-window
and kill-pane prompts. By Tiago Cunha.

Revision 1.76 / (download) - annotate - [select for diffs], Sat Jul 2 21:05:44 2011 UTC (12 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.75: +14 -7 lines
Diff to previous 1.75 (colored)

Allow the initial context on prompts to be set with the new -I option to
command-prompt. From Tiago Cunha.

Revision 1.75 / (download) - annotate - [select for diffs], Fri Apr 29 07:07:31 2011 UTC (13 years ago) by nicm
Branch: MAIN
Changes since 1.74: +2 -2 lines
Diff to previous 1.74 (colored)

Only redraw the status line on command update, not the entire client
(big DOH).

Revision 1.74 / (download) - annotate - [select for diffs], Sun Apr 24 21:32:07 2011 UTC (13 years ago) by nicm
Branch: MAIN
Changes since 1.73: +8 -1 lines
Diff to previous 1.73 (colored)

Provide #h for short hostname (no domain) from Michal Mazurek.

Revision 1.73 / (download) - annotate - [select for diffs], Mon Apr 18 19:49:05 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.72: +19 -1 lines
Diff to previous 1.72 (colored)

Add an option (mouse-select-window) which allows the mouse to be used by
clicking on the status line, written by hsim at gmx dot li.

Revision 1.72 / (download) - annotate - [select for diffs], Tue Mar 29 19:30:16 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.71: +30 -21 lines
Diff to previous 1.71 (colored)

Change -t on display-message to be target-pane for the #[A-Z]
replacements and add -c as target-client.

Revision 1.71 / (download) - annotate - [select for diffs], Wed Jan 26 01:54:56 2011 UTC (13 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.70: +98 -30 lines
Diff to previous 1.70 (colored)

Simplify the way jobs work and drop the persist type, so all jobs are
fire-and-forget.

Status jobs now managed with two trees of output (new and old), rather
than storing the output in the jobs themselves. When the status line is
processed any jobs which don't appear in the new tree are started and
the output from the old tree displayed. When a job finishes it updates
the new tree with its output and that is used for any subsequent
redraws. When the status interval expires, the new tree is moved to the
old so that all jobs are run again.

This fixes the "#(echo %H:%M:%S)" problem which would lead to thousands
of identical persistent jobs and high memory use (this can still be
achieved by adding "sleep 30" but that is much less likely to happen by
accident).

Revision 1.70 / (download) - annotate - [select for diffs], Mon Jan 3 21:30:49 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.69: +2 -2 lines
Diff to previous 1.69 (colored)

Handle a # at the end of a replacement string (such as status-left)
correctly. Found by Thomas Adam.

Revision 1.69 / (download) - annotate - [select for diffs], Sat Jan 1 16:51:21 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.68: +18 -18 lines
Diff to previous 1.68 (colored)

Move the user-visible parts of all options (names, types, limit, default
values) together into one set of tables in options-table.c. Also clean
up and simplify cmd-set-options.c and move a common print function into
option-table.c.

Revision 1.68 / (download) - annotate - [select for diffs], Thu Dec 30 23:16:18 2010 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.67: +2 -2 lines
Diff to previous 1.67 (colored)

Change from a per-session stack of buffers to one global stack which is
much more convenient and also simplifies lot of code. This renders
copy-buffer useless and makes buffer-limit now a server option.

By Tiago Cunha.

Revision 1.67 / (download) - annotate - [select for diffs], Thu Dec 30 21:35:17 2010 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.66: +3 -16 lines
Diff to previous 1.66 (colored)

Add a function to create window flags rather than doing the same thing
in two places. From Thomas Adam.

Revision 1.66 / (download) - annotate - [select for diffs], Sat Dec 11 16:13:15 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.65: +8 -7 lines
Diff to previous 1.65 (colored)

Oops, these functions return a const char *, so make the local variable
const as well.

Revision 1.65 / (download) - annotate - [select for diffs], Sat Dec 11 16:05:57 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.64: +58 -26 lines
Diff to previous 1.64 (colored)

Make the prompt history global for all clients which is much more useful than per-client history.

Revision 1.64 / (download) - annotate - [select for diffs], Mon Dec 6 22:51:02 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.63: +3 -1 lines
Diff to previous 1.63 (colored)

Add an option to alert (monitor) for silence (lack of activity) in a
window. From Thomas Adam.

Revision 1.63 / (download) - annotate - [select for diffs], Mon Jun 21 01:27:46 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.62: +11 -23 lines
Diff to previous 1.62 (colored)

Having a list of winlinks->alerts for each session is stupid, just store
the alert flags directly in the winlink itself.

Revision 1.62 / (download) - annotate - [select for diffs], Fri May 14 19:03:09 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.61: +12 -3 lines
Diff to previous 1.61 (colored)

Colour+attribute options for status line alerts, from Alex Alexander.

Revision 1.61 / (download) - annotate - [select for diffs], Wed Mar 31 18:05:14 2010 UTC (14 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.60: +2 -2 lines
Diff to previous 1.60 (colored)

Don't accept keys with modifiers as input. Fixes crash reported by Brian
R Landy.

Revision 1.60 / (download) - annotate - [select for diffs], Sat Mar 27 15:06:40 2010 UTC (14 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.59: +2 -1 lines
Diff to previous 1.59 (colored)

Don't leak job command in #().

Revision 1.59 / (download) - annotate - [select for diffs], Mon Mar 22 19:18:46 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.58: +1 -26 lines
Diff to previous 1.58 (colored)

Dead functions, lint.

Revision 1.58 / (download) - annotate - [select for diffs], Wed Jan 27 20:26:42 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.57: +7 -5 lines
Diff to previous 1.57 (colored)

Calculate offset correctly, fixes incorrect offset and prevents crash when
status-left is empty. From Micah Cowan.

Revision 1.57 / (download) - annotate - [select for diffs], Tue Jan 26 21:36:53 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.56: +5 -4 lines
Diff to previous 1.56 (colored)

Actually use the copy made when no newline is found, from martynas@.

Revision 1.56 / (download) - annotate - [select for diffs], Mon Dec 14 10:47:11 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.55: +5 -1 lines
Diff to previous 1.55 (colored)

Add server options to completion as well.

Revision 1.55 / (download) - annotate - [select for diffs], Thu Dec 3 22:50:10 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.54: +21 -21 lines
Diff to previous 1.54 (colored)

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...

Revision 1.54 / (download) - annotate - [select for diffs], Thu Dec 3 17:44:02 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.53: +9 -9 lines
Diff to previous 1.53 (colored)

Eliminate duplicate code and ease the passage for server-wide options by adding
a -w flag to set-option and show-options and making setw and showw aliases to
set -w and show -w.

Note: setw and showw are still there, but now aliases for set -w and show -w.

Revision 1.53 / (download) - annotate - [select for diffs], Thu Nov 26 22:28:24 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.52: +4 -2 lines
Diff to previous 1.52 (colored)

Tidy up various bits of the paste code, make the data buffer char * and add
comments.

Revision 1.52 / (download) - annotate - [select for diffs], Thu Nov 26 21:37:13 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.51: +2 -1 lines
Diff to previous 1.51 (colored)

Remove a couple of unused arguments where possible, and add /* ARGSUSED */ to
the rest to reduce lint output.

Revision 1.51 / (download) - annotate - [select for diffs], Fri Nov 20 07:01:12 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.50: +26 -25 lines
Diff to previous 1.50 (colored)

Display UTF-8 properly in status line messages and prompt. Cursor handling is
still way off though.

Revision 1.50 / (download) - annotate - [select for diffs], Fri Nov 20 06:33:26 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.49: +8 -5 lines
Diff to previous 1.49 (colored)

Remove oldest messages from log when limit is hit, not newest.

Revision 1.49 / (download) - annotate - [select for diffs], Thu Nov 19 21:30:53 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.48: +3 -3 lines
Diff to previous 1.48 (colored)

Get some brackets in the right place so ## works. Also fix a space in a
comment.

Revision 1.48 / (download) - annotate - [select for diffs], Thu Nov 19 19:47:28 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.47: +202 -188 lines
Diff to previous 1.47 (colored)

Change status line drawing to create the window list in a separate screen and
then copy it into the status line screen. This allows UTF-8 in window names and
fixes some problems with #[] in window-status-format.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Nov 19 16:22:10 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.46: +71 -38 lines
Diff to previous 1.46 (colored)

Two new options, window-status-format and window-status-current-format, which
allow the format of each window in the status line window list to be controlled
using similar # sequences as status-left/right.

This diff also moves part of the way towards UTF-8 support in window names but
it isn't quite there yet.

Revision 1.46 / (download) - annotate - [select for diffs], Thu Nov 19 11:38:54 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.45: +117 -112 lines
Diff to previous 1.45 (colored)

Tidy up by breaking the # replacement code into a separate function, also add a
few comments.

Revision 1.45 / (download) - annotate - [select for diffs], Thu Nov 19 10:22:07 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.44: +23 -9 lines
Diff to previous 1.44 (colored)

Don't interpret #() for display-message, it usually doesn't make sense and may
leak commands.

Revision 1.44 / (download) - annotate - [select for diffs], Wed Nov 18 13:16:33 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.43: +23 -5 lines
Diff to previous 1.43 (colored)

Add a per-client log of status line messages displayed while that client
exists. A new message-limit session option sets the maximum number of entries
and a command, show-messages, shows the log (bound to ~ by default).

This (and prompt history) might be better as a single global log but until
there are global options it is easier for them to be per client.

Revision 1.43 / (download) - annotate - [select for diffs], Tue Nov 17 13:30:07 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

Permit top-bit-set characters to be entered in the status line. They could
already be set from the shell and are just passed through when printing (so
invisible characters or displaying on terminals with different character sets
may cause problems).

Note that entering UTF-8 may not work and in any case currently the status line
cannot display it correctly (outside of status-left/status-right).

Revision 1.42 / (download) - annotate - [select for diffs], Wed Nov 4 23:29:42 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.41: +14 -5 lines
Diff to previous 1.41 (colored)

Use timeout events for the identify and message timers.

Revision 1.41 / (download) - annotate - [select for diffs], Wed Nov 4 21:04:43 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.40: +13 -10 lines
Diff to previous 1.40 (colored)

Switch jobs over to use a bufferevent.

Revision 1.40 / (download) - annotate - [select for diffs], Wed Nov 4 20:35:19 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.39: +2 -4 lines
Diff to previous 1.39 (colored)

Unused (but assigned to) variable, found by lint.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Nov 1 23:20:37 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored)

Add a flag for jobs that shouldn't be freed after they've died and use it for
status jobs, then only kill those jobs when status-left, status-right or
set-titles-string is changed.

Fixes problems with changing options from inside #().

Revision 1.38 / (download) - annotate - [select for diffs], Sat Oct 10 15:03:01 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.37: +51 -36 lines
Diff to previous 1.37 (colored)

Rather than running status-left, status-right and window title #() with popen
immediately every redraw, queue them up and run them in the background,
starting each once every status-interval. The actual status line uses the
output from the last run.

This brings several advantages:

- tmux itself may be called from inside #() without causing the server to hang;
- likewise, sleep or similar doesn't cause the server to block;
- commands aren't run excessively often when redrawing;
- commands shared by status-left and status-right, or used multiple times, will
  only be run once.

run-shell and if-shell still use system()/popen() but will be changed over to
use this too later.

Revision 1.37 / (download) - annotate - [select for diffs], Sat Oct 10 10:02:48 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

Add "grouped sessions" which have independent name, options, current window and
so on but where the linked windows are synchronized (ie creating, killing
windows and so on are mirrored between the sessions). A grouped session may be
created by passing -t to new-session.

Had this around for a while, tested by a couple of people.

Revision 1.36 / (download) - annotate - [select for diffs], Wed Sep 23 14:42:48 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.35: +6 -21 lines
Diff to previous 1.35 (colored)

Remove PROMPT_HIDDEN code which is now unused.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Sep 23 06:18:48 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.34: +1 -10 lines
Diff to previous 1.34 (colored)

Remove the internal tmux locking and instead detach each client and run the
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.

Revision 1.34 / (download) - annotate - [select for diffs], Sun Sep 20 14:58:12 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.33: +4 -4 lines
Diff to previous 1.33 (colored)

Regularise some fatal messages.

Revision 1.33 / (download) - annotate - [select for diffs], Thu Sep 10 17:16:24 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.32: +24 -23 lines
Diff to previous 1.32 (colored)

Permit options such as status-bg to be configured using the entire 256 colour
palette by setting "colour0" to "colour255".

Revision 1.32 / (download) - annotate - [select for diffs], Mon Sep 7 18:50:45 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.31: +5 -4 lines
Diff to previous 1.31 (colored)

Give each paste buffer a size member instead of requiring them to be
zero-terminated.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Sep 7 10:49:32 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.30: +19 -5 lines
Diff to previous 1.30 (colored)

Permit embedded colour and attributes in status-left and status-right using new
#[] special characters, for example #[fg=red,bg=blue,blink].

Revision 1.30 / (download) - annotate - [select for diffs], Wed Sep 2 06:33:20 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.29: +14 -2 lines
Diff to previous 1.29 (colored)

Add a transpose-chars command in edit mode (C-t in emacs mode only). From Kalle
Olavi Niemitalo.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Sep 1 09:11:05 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.28: +11 -17 lines
Diff to previous 1.28 (colored)

Use "Password:" with no space for password prompts and don't display a *s for
the password, like pretty much everything else. From martynas@ with minor
tweaks by me.

Revision 1.28 / (download) - annotate - [select for diffs], Mon Aug 31 20:46:19 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.27: +5 -4 lines
Diff to previous 1.27 (colored)

Add a new display-panes command, with two options (display-panes-colour and
display-panes-time), which displays a visual indication of the number of each
pane.

Revision 1.27 / (download) - annotate - [select for diffs], Wed Aug 19 10:39:50 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.26: +15 -1 lines
Diff to previous 1.26 (colored)

Extend command-prompt with a -p option which is a comma-separated list of one
or more prompts to present in order.

The responses to the prompt are replaced in the template string: %% are
replaced in order, so the first prompt replaces the first %%, the second
replaces the second, and so on. In addition, %1 up to %9 are replaced with the
responses to the first the ninth prompts

The default template is "%1" so the response to the first prompt is processed
as a command.

Note that this changes the behaviour for %% so if there is only one prompt,
only the first %% will be replaced. Templates such as "neww -n '%%' 'ssh %%'"
should be changed to "neww -n '%1' 'ssh %1'".

From Tiago Cunha.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Aug 18 07:23:43 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.25: +6 -1 lines
Diff to previous 1.25 (colored)

Add a "delete line" key when editing in the status line or the search up/down
prompt. C-u with emacs keys, d with vi.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Aug 13 23:44:18 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.24: +5 -8 lines
Diff to previous 1.24 (colored)

Switch the prompt code to return an empty string when the user enters no
response and reserve NULL for an explicit cancel. Change all callbacks to treat
them the same so no functional change.

Also add cancel key bindings to emacs mode which were missing.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Aug 8 20:36:42 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.23: +32 -4 lines
Diff to previous 1.23 (colored)

Options to set the colours and attributes for status-left/-right. From Thomas
Adam, thanks.

Revision 1.23 / (download) - annotate - [select for diffs], Wed Aug 5 16:26:38 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.22: +7 -7 lines
Diff to previous 1.22 (colored)

If colours are not supported by the terminal, try to emulate a coloured
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.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Jul 30 20:41:48 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.21: +2 -1 lines
Diff to previous 1.21 (colored)

Plug some memory leaks.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Jul 28 07:03:32 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

Next step towards customisable mode keys: build each default table of keys into
a named tree on start and use that for lookups. Also add command to string
translation tables and modify list-keys to show the the mode key bindings (new
-t argument).

Revision 1.20 / (download) - annotate - [select for diffs], Mon Jul 27 19:29:35 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.19: +23 -19 lines
Diff to previous 1.19 (colored)

Change mode key bindings from big switches into a set of tables. Rather than
lumping them all together, split editing keys from those used in choice/more
mode and those for copy/scroll mode.

Tidier and clearer, and the first step towards customisable mode keys.

Revision 1.19 / (download) - annotate - [select for diffs], Mon Jul 27 18:51:46 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.18: +1 -3 lines
Diff to previous 1.18 (colored)

Get rid of empty mode_key_free function.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Jul 27 12:11:11 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.17: +7 -1 lines
Diff to previous 1.17 (colored)

Add a key to delete to end of line at the prompt (^K in emacs mode, C/D in vi).

From Kalle Olavi Niemitalo.

Revision 1.17 / (download) - annotate - [select for diffs], Sun Jul 26 21:13:47 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.16: +19 -19 lines
Diff to previous 1.16 (colored)

Calculate the space available for the prompt buffer and the cursor position
correctly, and make it work when the screen is not wide enough.

Noticed by Kalle Olavi Niemitalo.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Jul 21 18:40:30 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

Remove a couple of unused functions and fix a type ("FALLTHOUGH"), found by
lint.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jul 20 14:32:09 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.14: +17 -2 lines
Diff to previous 1.14 (colored)

Add a status-justify option to allow the window list in the status line to be
positioned at the left, centre, or right.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Jul 20 09:15:18 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.13: +12 -2 lines
Diff to previous 1.13 (colored)

New options, window-status-current-{fg,bg,attr}, to set the fg, bg and
attributes with which the current window is shown in the status line. From
Johan Friis, thanks.

Revision 1.13 / (download) - annotate - [select for diffs], Fri Jul 17 18:45:08 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.12: +20 -3 lines
Diff to previous 1.12 (colored)

- New command display-message (alias display) to display a message in the
  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!

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jul 17 06:13:27 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.11: +21 -10 lines
Diff to previous 1.11 (colored)

Memory could be leaked if a second prompt or message appeared while another was
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.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Jul 16 23:25:21 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.10: +1 -5 lines
Diff to previous 1.10 (colored)

Remove some duplicate code that was causing the status line to be redrawn even
when it hadn't changed.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Jul 15 17:39:00 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.9: +7 -4 lines
Diff to previous 1.9 (colored)

Make status_message_set a variadic printf-like function. No functional change -
helpful for a couple of things coming soon.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Jul 15 07:50:34 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.8: +4 -6 lines
Diff to previous 1.8 (colored)

Having to update NSETOPTION/NSETWINDOWOPTION when adding new options is a bit
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.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Jul 14 19:11:58 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

For some reason when clearing status/message it was redrawing the entire client
not just the status line. Changing this also revealed the check for the status
line was incorrect when drawing the pane.

Revision 1.7 / (download) - annotate - [select for diffs], Tue Jul 14 19:03:16 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.6: +15 -34 lines
Diff to previous 1.6 (colored)

Instead of faking up a status line in status_redraw, use the same code to
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.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Jul 12 16:15:34 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.5: +2 -1 lines
Diff to previous 1.5 (colored)

Add a "back to indentation" key in copy mode to move the cursor to the first
non-whitespace character. ^ with vi and M-m with emacs key bindings. Another
from Kalle Olavi Niemitalo, thanks.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jun 26 15:13:39 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.4: +5 -6 lines
Diff to previous 1.4 (colored)

Status line fixes: don't truncate status-right now the length calculation is
done for UTF-8, limit to the maximum length correctly when printing, and always
print a space even if the left string is longer than the width available.

Revision 1.4 / (download) - annotate - [select for diffs], Thu Jun 4 21:43:24 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.3: +7 -1 lines
Diff to previous 1.3 (colored)

If the prompt is hidden or a password is sent with -U, zero it before freeing
it.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jun 3 16:54:26 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.2: +11 -6 lines
Diff to previous 1.2 (colored)

New session option, status-utf8, to control the interpretation of top-bit-set
characters in status-left and status-right (if on, they are treated as UTF-8;
otherwise passed through).

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 3 16:05:46 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1: +11 -10 lines
Diff to previous 1.1 (colored)

Add a UTF-8 aware string length function and make UTF-8 in
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.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jun 1 22:58:49 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN

Import tmux, a terminal multiplexor allowing (among other things) a single
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

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.