OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.290 / (download) - annotate - [select for diffs], Wed Apr 10 07:15:21 2024 UTC (5 weeks, 3 days ago) by nicm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.289: +2 -2 lines
Diff to previous 1.289 (colored)

Do not get muddled and crash if focusing a pane that is exiting,
reported by Saul Nogueras in GitHub issue 3776.

Revision 1.289 / (download) - annotate - [select for diffs], Thu Mar 21 11:30:42 2024 UTC (8 weeks, 2 days ago) by nicm
Branch: MAIN
Changes since 1.288: +7 -5 lines
Diff to previous 1.288 (colored)

Do not notify window-layout-changed if the window is about to be
destroyed (since it may have been freed by the time the notify happens),
from Romain Francoise in GitHub issue 3860.

Revision 1.288 / (download) - annotate - [select for diffs], Tue Feb 13 08:03:50 2024 UTC (3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5
Changes since 1.287: +7 -1 lines
Diff to previous 1.287 (colored)

Do not allow paste into panes which have exited, from Romain Francoise
in GitHub issue 3830.

Revision 1.287 / (download) - annotate - [select for diffs], Mon Oct 23 08:12:00 2023 UTC (6 months, 3 weeks ago) by nicm
Branch: MAIN
Changes since 1.286: +2 -1 lines
Diff to previous 1.286 (colored)

Unzoom window at start of destroy so it doesn't happen later (when
destroying panes) after the layout has been freed, GitHub issue 3717.

Revision 1.286 / (download) - annotate - [select for diffs], Mon Jul 10 09:24:53 2023 UTC (10 months, 1 week ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.285: +41 -17 lines
Diff to previous 1.285 (colored)

Use a stack for last panes line windows, from Thomas Bertschinger in
GitHub issue 3588.

Revision 1.285 / (download) - annotate - [select for diffs], Mon Mar 27 08:47:57 2023 UTC (13 months, 3 weeks ago) by nicm
Branch: MAIN
Changes since 1.284: +2 -1 lines
Diff to previous 1.284 (colored)

Add a format to show if there are unseen changes while in a mode, from
Dan Aloni in GitHub issue 3498.

Revision 1.284 / (download) - annotate - [select for diffs], Sun Jan 8 22:17:04 2023 UTC (16 months, 1 week ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.283: +4 -2 lines
Diff to previous 1.283 (colored)

Have client return 1 if process is interrupted to an input pane.

Revision 1.283 / (download) - annotate - [select for diffs], Fri Jan 6 07:09:27 2023 UTC (16 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.282: +8 -10 lines
Diff to previous 1.282 (colored)

If a pane is killed, cancel reading from the file. GitHub issue 3422.

Revision 1.282 / (download) - annotate - [select for diffs], Wed Aug 24 07:22:30 2022 UTC (20 months, 3 weeks ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.281: +3 -1 lines
Diff to previous 1.281 (colored)

Check for NULL returns from bufferevent_new.

Revision 1.281 / (download) - annotate - [select for diffs], Fri Jun 17 07:28:05 2022 UTC (23 months ago) by nicm
Branch: MAIN
Changes since 1.280: +16 -1 lines
Diff to previous 1.280 (colored)

Check cursor options when a pane is created, not just when they are changed.

Revision 1.280 / (download) - annotate - [select for diffs], Mon May 30 12:55:25 2022 UTC (23 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.279: +2 -2 lines
Diff to previous 1.279 (colored)

Spacing/style nits.

Revision 1.279 / (download) - annotate - [select for diffs], Wed Mar 16 17:00:17 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.278: +20 -1 lines
Diff to previous 1.278 (colored)

Add an option to set the character used for unused areas of the
terminal, GitHub issue 3110.

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

Update focus when active pane changes after pane destroyed.

Revision 1.277 / (download) - annotate - [select for diffs], Thu Oct 7 07:52:13 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.276: +6 -2 lines
Diff to previous 1.276 (colored)

Handle splitw -I correctly when used from an attached client, GitHub
issue 2917.

Revision 1.276 / (download) - annotate - [select for diffs], Fri Aug 27 17:15:57 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.275: +3 -1 lines
Diff to previous 1.275 (colored)

Allow control mode clients to set a hard limit on the window width and
height, GitHub issue 2594.

Revision 1.275 / (download) - annotate - [select for diffs], Fri Aug 20 17:36:03 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.274: +3 -1 lines
Diff to previous 1.274 (colored)

Fill colour palette correctly from option for new panes, GitHub issue
2831.

Revision 1.274 / (download) - annotate - [select for diffs], Fri Aug 13 06:52:51 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.273: +52 -1 lines
Diff to previous 1.273 (colored)

Change focus to be driven by events rather than walking all panes at end
of event loop, this way the ordering of in and out can be enforced.
GitHub issue 2808.

Revision 1.273 / (download) - annotate - [select for diffs], Wed Aug 11 20:49:55 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.272: +12 -60 lines
Diff to previous 1.272 (colored)

Break the colour palette into a struct rather than just a single array
and use that to support the OSC palette-setting sequences in popups.
Also add a pane-colours array option to specify the defaults. GitHub
issue 2815.

Revision 1.272 / (download) - annotate - [select for diffs], Thu Jun 10 07:33:41 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.271: +21 -32 lines
Diff to previous 1.271 (colored)

Change resize timers and flags into one timer and a queue which is
simpler and fixes problems with vim when resized multiple times. GitHub
issue 2677.

Revision 1.271 / (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.270: +3 -1 lines
Diff to previous 1.270 (colored)

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

Revision 1.270 / (download) - annotate - [select for diffs], Thu Mar 11 06:31:05 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.269: +4 -4 lines
Diff to previous 1.269 (colored)

Add split-window -Z to start the pane zoomed, GitHub issue 2591.

Revision 1.269 / (download) - annotate - [select for diffs], Mon Feb 22 07:09:06 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.268: +1 -12 lines
Diff to previous 1.268 (colored)

There are many format variables now so allocating all the default ones
each time a tree is created is too expensive. Instead, convert them all
into callbacks and put them in a static table so they only allocate on
demand. The tree remains for the moment for extra (non-default)
variables added by for example copy mode or popups. Also reduce
expensive calls to localtime_r/strftime. GitHub issue 2253.

Revision 1.268 / (download) - annotate - [select for diffs], Wed Jan 20 07:16:54 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.267: +6 -3 lines
Diff to previous 1.267 (colored)

Change so that window_flags escapes # automatically which means configs
will not have to change. A new format window_raw_flags contains the old
unescaped version.

Revision 1.267 / (download) - annotate - [select for diffs], Tue Dec 15 08:31:50 2020 UTC (3 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.266: +19 -12 lines
Diff to previous 1.266 (colored)

Make synchronize-panes a pane option and add -U flag to set-option to
unset an option on all panes. GitHub issue 2491 from Rostislav Nesin.

Revision 1.266 / (download) - annotate - [select for diffs], Sat Jun 13 09:05:53 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.265: +9 -5 lines
Diff to previous 1.265 (colored)

Add -b flags to insert a window before (like the existing -a for after)
to break-pane, move-window, new-window. GitHub issue 2261.

Revision 1.265 / (download) - annotate - [select for diffs], Fri Jun 5 11:20:51 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.264: +22 -6 lines
Diff to previous 1.264 (colored)

Change how panes are resized so that the code is clearer and if the pane
is resized multiple times during one event loop, it is forced to resize
at the end. Also don't zoom/unzoom in switch-client if the pane hasn't
changed. GitHub issue 2260.

Revision 1.264 / (download) - annotate - [select for diffs], Mon Jun 1 09:43:01 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.263: +5 -21 lines
Diff to previous 1.263 (colored)

Instead of sending all data to control mode clients as fast as possible,
add a limit of how much data will be sent to the client and try to use
it for panes with some degree of fairness. GitHub issue 2217, with
George Nachman.

Revision 1.263 / (download) - annotate - [select for diffs], Thu May 21 07:24:13 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.262: +56 -14 lines
Diff to previous 1.262 (colored)

Support code for control mode flow control: allow clients to have
separate offsets (used and acknowleged) into the pane buffers; turn off
reading from panes when no clients can accept the data; and add a -A
flag to refresh-client to let clients turn receiving a pane on and off.

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

Move lazy resize from the pane to the window, there is no point in
resizing the window unless it is the current window, and if we do and
don't resize the pane until later there are problems if the size changes
from A to B then back to A.

Revision 1.261 / (download) - annotate - [select for diffs], Sat May 16 16:35:13 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.260: +5 -3 lines
Diff to previous 1.260 (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.260 / (download) - annotate - [select for diffs], Sat May 16 15:34:08 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.259: +1 -21 lines
Diff to previous 1.259 (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.259 / (download) - annotate - [select for diffs], Sat May 16 15:01:31 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.258: +6 -1 lines
Diff to previous 1.258 (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.258 / (download) - annotate - [select for diffs], Sat May 16 14:53:23 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.257: +10 -10 lines
Diff to previous 1.257 (colored)

Use a grid cell not a style for the pane style.

Revision 1.257 / (download) - annotate - [select for diffs], Mon Apr 13 20:51:57 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.256: +2 -2 lines
Diff to previous 1.256 (colored)

Make client -c and -t handling common in cmd-queue.c and try to be
clearer about whether the client is the target client (must have a
session) or not.

Revision 1.256 / (download) - annotate - [select for diffs], Mon Apr 13 10:59:59 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.255: +2 -2 lines
Diff to previous 1.255 (colored)

Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make its
use more clearly defined and preparation for some future work).

Revision 1.255 / (download) - annotate - [select for diffs], Fri Apr 10 07:44:26 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.254: +5 -3 lines
Diff to previous 1.254 (colored)

Now that copy mode copies the pane content rather than keeping a
reference to it, it isn't necessary that the pane in copy mode is the
same as the one copying from. Add a -s flag to copy-mode to specify a
different pane for the source content. This means it is possible to view
two places in a pane's history at the same time in different panes, or
copy from a pane's history into an editor or shell in the same pane.

From Anindya Mukherjee.

Revision 1.254 / (download) - annotate - [select for diffs], Thu Apr 9 13:49:21 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.253: +2 -2 lines
Diff to previous 1.253 (colored)

Pass correct flags to fnmatch.

Revision 1.253 / (download) - annotate - [select for diffs], Mon Apr 6 17:51:34 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.252: +1 -28 lines
Diff to previous 1.252 (colored)

Change copy mode to make copy of the pane history so it does not need to
freeze updates (which does not play nicely with some applications, a
longstanding problem) and will allow some other changes later. From
Anindya Mukherjee.

Revision 1.252 / (download) - annotate - [select for diffs], Tue Mar 31 07:00:34 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.251: +4 -77 lines
Diff to previous 1.251 (colored)

Move alternate screen into the screen rather than the pane.

Revision 1.251 / (download) - annotate - [select for diffs], Tue Mar 31 06:35:38 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.250: +4 -5 lines
Diff to previous 1.250 (colored)

Detach reply escape sequences from the pane so they work in popups.

Revision 1.250 / (download) - annotate - [select for diffs], Thu Mar 19 14:03:49 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.249: +6 -6 lines
Diff to previous 1.249 (colored)

Change input path so it doesn't require a pane.

Revision 1.249 / (download) - annotate - [select for diffs], Mon Mar 16 08:23:24 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.248: +3 -3 lines
Diff to previous 1.248 (colored)

FIx type for %u, from Thomas Adam.

Revision 1.248 / (download) - annotate - [select for diffs], Fri Feb 14 13:57:58 2020 UTC (4 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.247: +15 -8 lines
Diff to previous 1.247 (colored)

Fix top/bottom pane calculation with pane border status enabled,
reported by Stanislav Spassov.

Revision 1.247 / (download) - annotate - [select for diffs], Mon Jan 13 07:51:55 2020 UTC (4 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.246: +9 -7 lines
Diff to previous 1.246 (colored)

Treat plausible but invalid keys (like C-BSpace) as literal like any
other unrecognised string passed to send-keys. Reported by Anthony
Sottile in GitHub issue 2049.

Revision 1.246 / (download) - annotate - [select for diffs], Thu Dec 12 11:39:56 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.245: +14 -15 lines
Diff to previous 1.245 (colored)

Rewrite the code for reading and writing files. Now, if the client is
not attached, the server process asks it to open the file, similar to
how works for stdin, stdout, stderr. This makes special files like
/dev/fd/X work (used by some shells). stdin, stdout and stderr and
control mode are now just special cases of the same mechanism. This will
also make it easier to use for other commands that read files such as
source-file.

Revision 1.245 / (download) - annotate - [select for diffs], Thu Nov 28 09:45:16 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.244: +40 -4 lines
Diff to previous 1.244 (colored)

Make a best effort to set xpixel and ypixel for each pane and add
formats for them.

Revision 1.244 / (download) - annotate - [select for diffs], Mon Oct 28 09:07:59 2019 UTC (4 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.243: +2 -2 lines
Diff to previous 1.243 (colored)

Start with empty rather than NULL window name to avoid NULL printf if
window_name is evaluated early. Reported by Mikolaj Kucharski.

Revision 1.243 / (download) - annotate - [select for diffs], Tue Sep 10 19:35:34 2019 UTC (4 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.242: +5 -1 lines
Diff to previous 1.242 (colored)

Make client exit if pane where input is going is closed.

Revision 1.242 / (download) - annotate - [select for diffs], Wed Aug 28 07:34:32 2019 UTC (4 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.241: +2 -2 lines
Diff to previous 1.241 (colored)

The resize event was never deciding to actually resize the pane if there
was output in the pane faster than the timer would fire, so change how
it works to only defer the timer again if the pane was actually resized
within the last timer period. Reported by James Tai in GitHub issue
1880.

Revision 1.241 / (download) - annotate - [select for diffs], Wed Aug 14 09:58:31 2019 UTC (4 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.240: +23 -1 lines
Diff to previous 1.240 (colored)

Add -Z flag to rotate-window, select-pane, swap-pane, switch-client to
preserve zoomed state. GitHub issue 1839.

Revision 1.240 / (download) - annotate - [select for diffs], Sun Jun 30 19:21:53 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.239: +2 -2 lines
Diff to previous 1.239 (colored)

Do not double free window if pane fails to start.

Revision 1.239 / (download) - annotate - [select for diffs], Wed Jun 26 18:44:22 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.238: +2 -2 lines
Diff to previous 1.238 (colored)

Fix a typo in window_pane_find_down (w not wp) and a missing PANE_STATUS_TOP.

Revision 1.238 / (download) - annotate - [select for diffs], Wed Jun 26 13:05:24 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.237: +3 -1 lines
Diff to previous 1.237 (colored)

Log window and pane resizes.

Revision 1.237 / (download) - annotate - [select for diffs], Wed Jun 26 13:03:47 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.236: +37 -13 lines
Diff to previous 1.236 (colored)

Add #define for the pane status line option position numbers.

Revision 1.236 / (download) - annotate - [select for diffs], Mon Jun 24 08:20:02 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.235: +9 -1 lines
Diff to previous 1.235 (colored)

Trim trailing spaces when matching.

Revision 1.235 / (download) - annotate - [select for diffs], Thu Jun 20 13:40:22 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.234: +3 -3 lines
Diff to previous 1.234 (colored)

allow-rename and alternate-screen can be pane options.

Revision 1.234 / (download) - annotate - [select for diffs], Thu Jun 20 11:59:59 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.233: +32 -25 lines
Diff to previous 1.233 (colored)

Add a per-pane option set. Pane options inherit from window options (so
there should be no change to existing behaviour) and are set and shown
with set-option -p and show-options -p.

Change remain-on-exit and window-style/window-active-style to be pane
options (some others will be changed later).

This makes select-pane -P and -g unnecessary so no longer document them
(they still work) and no longer document set-window-option and
show-window-options in favour of set-option -w and show-options -w.

Revision 1.233 / (download) - annotate - [select for diffs], Tue Jun 18 11:08:42 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.232: +2 -2 lines
Diff to previous 1.232 (colored)

Add a cmdq_continue function rather than twiddling the flag directly.

Revision 1.232 / (download) - annotate - [select for diffs], Thu Jun 13 19:46:00 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.231: +27 -9 lines
Diff to previous 1.231 (colored)

Add regular expression support for the format search, match and
substitute modifiers.

Revision 1.231 / (download) - annotate - [select for diffs], Sun Jun 9 06:50:24 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.230: +21 -13 lines
Diff to previous 1.230 (colored)

Exiting alternate screen mode should restore cursor position and
attributes even if already outside alternate screen mode. GitHub issue
1789.

Revision 1.230 / (download) - annotate - [select for diffs], Thu May 30 20:54:03 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.229: +2 -2 lines
Diff to previous 1.229 (colored)

Remove a leftover abort and some fixes from cppcheck.

Revision 1.229 / (download) - annotate - [select for diffs], Tue May 7 10:25:15 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.228: +6 -4 lines
Diff to previous 1.228 (colored)

Do not use evbuffer_add_buffer because it is destructive and doesn't
work in newer libevent.

Revision 1.228 / (download) - annotate - [select for diffs], Fri May 3 20:44:24 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.227: +48 -1 lines
Diff to previous 1.227 (colored)

Allow panes to be empty (no command), output can be piped to them with
split-window or display-message -I.

Revision 1.227 / (download) - annotate - [select for diffs], Fri Apr 26 10:24:26 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.226: +3 -3 lines
Diff to previous 1.226 (colored)

Destroy panes before options to avoid crash when forced into a mode by a
hook.

Revision 1.226 / (download) - annotate - [select for diffs], Wed Apr 17 14:37:48 2019 UTC (5 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.225: +30 -187 lines
Diff to previous 1.225 (colored)

Break new window and pane creation common code from various commands and
window.c into a separate file spawn.c.

Revision 1.225 / (download) - annotate - [select for diffs], Mon Mar 18 21:55:04 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.224: +3 -1 lines
Diff to previous 1.224 (colored)

Free temporary screens when writing format.

Revision 1.224 / (download) - annotate - [select for diffs], Mon Mar 18 20:53:33 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.223: +1 -2 lines
Diff to previous 1.223 (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.223 / (download) - annotate - [select for diffs], Mon Mar 18 15:25:36 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.222: +5 -4 lines
Diff to previous 1.222 (colored)

Mode init needs to be fired with the mode on the list or it will not be
resized correctly.

Revision 1.222 / (download) - annotate - [select for diffs], Mon Mar 18 14:10:25 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.221: +12 -1 lines
Diff to previous 1.221 (colored)

Add format variables for the default formats for the various modes
(tree_mode_format and so on) and add a -a flag to display-message to
list variables with values.

Revision 1.221 / (download) - annotate - [select for diffs], Thu Mar 14 09:53:52 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.220: +11 -11 lines
Diff to previous 1.220 (colored)

Add a wrapper (struct style) around styles rather than using the
grid_cell directly. There will be some non-cell members soon.

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

Do not use const on struct window_pane, it causes more trouble than it
is worth.

Revision 1.219 / (download) - annotate - [select for diffs], Tue Mar 12 13:56:30 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.218: +3 -3 lines
Diff to previous 1.218 (colored)

Fix resizing of control clients, should be ignored until SIZECHANGED flag set.

Revision 1.218 / (download) - annotate - [select for diffs], Tue Mar 12 11:16:50 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.217: +63 -28 lines
Diff to previous 1.217 (colored)

Allow multiple modes to be open in a pane. A stack of open modes is kept
and the previous restored when the top is exited. If a mode that is
already on the stack is entered, the existing instance is moved to the
top as the active mode rather than being opened new.

Revision 1.217 / (download) - annotate - [select for diffs], Thu Mar 7 20:24:21 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.216: +16 -12 lines
Diff to previous 1.216 (colored)

Add a separate mode struct for the active window mode if any.

Revision 1.216 / (download) - annotate - [select for diffs], Tue Dec 18 13:20:44 2018 UTC (5 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.215: +3 -3 lines
Diff to previous 1.215 (colored)

Pass window into mode functions.

Revision 1.215 / (download) - annotate - [select for diffs], Fri Nov 30 08:44:40 2018 UTC (5 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.214: +5 -1 lines
Diff to previous 1.214 (colored)

Clear PANE_EXITED flag when starting new child process in case the pane
has been respawned.

Revision 1.214 / (download) - annotate - [select for diffs], Mon Nov 19 13:35:41 2018 UTC (5 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.213: +3 -1 lines
Diff to previous 1.213 (colored)

evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547.

Revision 1.213 / (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.212: +23 -39 lines
Diff to previous 1.212 (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.212 / (download) - annotate - [select for diffs], Sun Aug 5 08:59:30 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.211: +1 -2 lines
Diff to previous 1.211 (colored)

calloc the mode data instead of malloc and initialize everything.

Revision 1.211 / (download) - annotate - [select for diffs], Thu Aug 2 18:35:21 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.210: +2 -3 lines
Diff to previous 1.210 (colored)

Log command arguments.

Revision 1.210 / (download) - annotate - [select for diffs], Thu May 24 09:42:49 2018 UTC (5 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.209: +3 -2 lines
Diff to previous 1.209 (colored)

Make server_client_get_cwd used (almost) everywhere we need to work out
the cwd, and do not fall back to "." as it is pretty useless. GitHub
issue 1331.

Revision 1.209 / (download) - annotate - [select for diffs], Thu May 24 09:34:54 2018 UTC (5 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.208: +7 -4 lines
Diff to previous 1.208 (colored)

Improve logging of the environment etc for new panes.

Revision 1.208 / (download) - annotate - [select for diffs], Fri Mar 16 15:15:39 2018 UTC (6 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.207: +11 -5 lines
Diff to previous 1.207 (colored)

Insert full size panes at the right position, from KOIE Hidetaka in
GitHub issue 1284.

Revision 1.207 / (download) - annotate - [select for diffs], Thu Nov 9 23:02:13 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.206: +10 -5 lines
Diff to previous 1.206 (colored)

If we successfully change the directory, set PWD too to give the shell a
hint in case of symlinks.

Revision 1.206 / (download) - annotate - [select for diffs], Thu Oct 12 11:32:27 2017 UTC (6 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.205: +2 -1 lines
Diff to previous 1.205 (colored)

Show exit status and time in the remain-on-exit pane text, mostly from
Timo Boettcher in GitHub issue 1103.

Revision 1.205 / (download) - annotate - [select for diffs], Mon Aug 28 12:36:38 2017 UTC (6 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.204: +9 -12 lines
Diff to previous 1.204 (colored)

Do not forbid targets to specify non-visible panes - the checks for
visibility are better where the target is used. GitHub issue 1049.

Revision 1.204 / (download) - annotate - [select for diffs], Fri Jul 14 18:49:07 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.203: +2 -2 lines
Diff to previous 1.203 (colored)

Because ignore SIGCHLD early, letting signal_del restore it doesn't work
correctly, so set it explicitly back to default (and the others for good
measure).

Revision 1.203 / (download) - annotate - [select for diffs], Wed Jul 12 10:04:51 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.202: +14 -6 lines
Diff to previous 1.202 (colored)

Block signals between forking and clearing signal handlers (or calling
event_reinit) - if the child gets a signal and fires the libevent signal
handler during this period it could write a signal into the parent's
signal pipe. GitHub issue 1001 from Aaron van Geffen.

Revision 1.202 / (download) - annotate - [select for diffs], Wed Jul 12 09:24:17 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.201: +2 -2 lines
Diff to previous 1.201 (colored)

Move signal code into proc.c.

Revision 1.201 / (download) - annotate - [select for diffs], Mon Jul 3 12:38:50 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.200: +10 -6 lines
Diff to previous 1.200 (colored)

Change previous to not wait for both process exit and pty close -
instead if there is a pipe-pane active, do not exit until all data is
read (including any libevent hasn't seen yet). Fixes problem reported by
Theo Buehler and still seems to solve the original issue.

Revision 1.200 / (download) - annotate - [select for diffs], Mon Jul 3 08:16:03 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.199: +19 -2 lines
Diff to previous 1.199 (colored)

Do not close panes until process has exited and any outstanding data
has been written to the pipe-pane event if there is one. GitHub issue 991.

Revision 1.199 / (download) - annotate - [select for diffs], Wed Jun 28 11:36:40 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.198: +2 -2 lines
Diff to previous 1.198 (colored)

Apply the xterm key flag when needed for send-keys, fixes problem
reported by Franky Spamschleuder.

Revision 1.198 / (download) - annotate - [select for diffs], Sun Jun 4 09:02:36 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.197: +3 -2 lines
Diff to previous 1.197 (colored)

Be more strict about escape sequences that rename windows or set titles:
ignore any that not valid UTF-8 outright, and for good measure pass the
result through our UTF-8-aware vis(3).

Revision 1.197 / (download) - annotate - [select for diffs], Wed May 31 10:15:51 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.196: +3 -3 lines
Diff to previous 1.196 (colored)

Because we defer actually resizing applications (calling TIOCSWINSZ)
until the end of the server loop, tmux may have gone through several
internal resizes in between. This can be a problem if the final size is
the same as the initial size (what the application things it currently
is), because the application may choose not to redraw, assuming the
screen state is unchanged, when in fact tmux has thrown away parts of
the screen, assuming the application will redraw them.

To avoid this, do an extra resize if the new size is the same size as
the initial size. This should force the application to redraw when tmux
needs it to, while retaining the benefits of deferring (so we now resize
at most two times instead of at most one - and only two very rarely).

Fixes a problem with break-pane and zoomed panes reported by Michal
Mazurek.

Revision 1.196 / (download) - annotate - [select for diffs], Tue May 30 21:44:59 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.195: +4 -29 lines
Diff to previous 1.195 (colored)

Rewrite of choose mode, both to simplify and tidy the code and to add
some modern features.

Now the common code is in mode-tree.c, which provides an API used by the
three modes now separated into window-{buffer,client,tree}.c. Buffer
mode shows buffers, client mode clients and tree mode a tree of
sessions, windows and panes.

Each mode has a common set of key bindings plus a few that are specific
to the mode. Other changes are:

- each mode has a preview pane: for buffers this is the buffer content
  (very useful), for others it is a preview of the pane;

- items may be sorted in different ways ('O' key);

- multiple items may be tagged and an operation applied to all of them
  (for example, to delete multiple buffers at once);

- in tree mode a command may be run on the selected item (session,
  window, pane) or on tagged items (key ':');

- displayed items may be filtered in tree mode by using a format (this
  is used to implement find-window) (key 'f');

- the custom format (-F) for the display is no longer available;

- shortcut keys change from 0-9, a-z, A-Z which was always a bit weird
  with keys used for other uses to 0-9, M-a to M-z.

Now that the code is simpler, other improvements will come later.

Primary key bindings for each mode are documented under the commands in
the man page (choose-buffer, choose-client, choose-tree).

Parts written by Thomas Adam.

Revision 1.195 / (download) - annotate - [select for diffs], Mon May 29 18:06:34 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.194: +26 -2 lines
Diff to previous 1.194 (colored)

Add ||, && format operators and C: to search pane content.

Revision 1.194 / (download) - annotate - [select for diffs], Fri May 12 10:45:38 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.193: +2 -1 lines
Diff to previous 1.193 (colored)

Store copy mode search string in pane so search-again command works even
if you exit and reenter copy mode (it doesn't remember the position,
just the search string), suggested by espie@.

Revision 1.193 / (download) - annotate - [select for diffs], Thu May 4 07:16:43 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.192: +12 -3 lines
Diff to previous 1.192 (colored)

Some new notifications, mainly for active pane and current window and
session:

    pane-mode-changed
    window-pane-changed
    client-session-changed
    session-window-changed

From Joshua Brot.

Revision 1.192 / (download) - annotate - [select for diffs], Fri Apr 28 19:13:55 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.191: +15 -9 lines
Diff to previous 1.191 (colored)

Log what is happening with window and session reference counts much more
obviously.

Revision 1.191 / (download) - annotate - [select for diffs], Fri Apr 28 19:12:15 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.190: +2 -2 lines
Diff to previous 1.190 (colored)

Remove a reference from the right window when removing from a winlink's
list.

Revision 1.190 / (download) - annotate - [select for diffs], Thu Apr 20 17:49:26 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.189: +2 -2 lines
Diff to previous 1.189 (colored)

Use fdforkpty() instead of our own unwrapped versions.

Revision 1.189 / (download) - annotate - [select for diffs], Thu Apr 20 09:43:45 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.188: +5 -5 lines
Diff to previous 1.188 (colored)

Now that struct winlink has a session pointer, can remove some arguments.

Revision 1.188 / (download) - annotate - [select for diffs], Thu Apr 20 09:39:07 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.187: +5 -5 lines
Diff to previous 1.187 (colored)

There is no real need for window_printable_flags to allocate, make it
return a buffer from the stack.

Revision 1.187 / (download) - annotate - [select for diffs], Tue Mar 21 09:49:10 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.186: +10 -8 lines
Diff to previous 1.186 (colored)

Fix pane movement by direction (up, down, left, right) when
pane-border-status is set, from KOIE Hidetaka.

Revision 1.186 / (download) - annotate - [select for diffs], Mon Mar 13 17:20:11 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.185: +8 -4 lines
Diff to previous 1.185 (colored)

Log where panes are created.

Revision 1.185 / (download) - annotate - [select for diffs], Mon Feb 27 13:07:57 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.184: +12 -9 lines
Diff to previous 1.184 (colored)

If splitw -b is used, insert the new pane before the current one in the
pane list. This means the numbering is in order (for example for
display-panes) and fixes a problem with redrawing the active pane
borders.

Revision 1.184 / (download) - annotate - [select for diffs], Wed Feb 22 09:01:32 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.183: +2 -1 lines
Diff to previous 1.183 (colored)

Minor bits: fix an array size, add comment, make grid_cell_entry static.

Revision 1.183 / (download) - annotate - [select for diffs], Wed Feb 8 08:25:12 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.182: +3 -26 lines
Diff to previous 1.182 (colored)

Remove event watermarks, don't work well enough to be worth it.

Revision 1.182 / (download) - annotate - [select for diffs], Tue Jan 24 13:28:33 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.181: +3 -2 lines
Diff to previous 1.181 (colored)

Shorten a long line, and don't leak buffer in paste_add if size is zero.

Revision 1.181 / (download) - annotate - [select for diffs], Mon Jan 23 10:09:43 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.180: +2 -2 lines
Diff to previous 1.180 (colored)

Open /dev/ptm before pledge() and save it to be used for PTMGET later
(this means inlining forkpty()).

ok deraadt

Revision 1.180 / (download) - annotate - [select for diffs], Thu Jan 12 10:15:55 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.179: +21 -21 lines
Diff to previous 1.179 (colored)

Put all palette functions together in the file.

Revision 1.179 / (download) - annotate - [select for diffs], Thu Jan 12 00:24:28 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.178: +2 -2 lines
Diff to previous 1.178 (colored)

Erm the aixterm colours should start at 8, not 7.

Revision 1.178 / (download) - annotate - [select for diffs], Thu Jan 12 00:19:32 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.177: +25 -5 lines
Diff to previous 1.177 (colored)

Fix setting the palette of aixterm colours (90-97).

Revision 1.177 / (download) - annotate - [select for diffs], Sat Jan 7 15:28:13 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.176: +51 -10 lines
Diff to previous 1.176 (colored)

Add support for the OSC 4 and OSC 104 palette setting escape sequences,
from S Gilles.

Revision 1.176 / (download) - annotate - [select for diffs], Wed Nov 16 09:22:16 2016 UTC (7 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.175: +2 -1 lines
Diff to previous 1.175 (colored)

Initialize modeprefix to 1 properly in window_pane_create, from Artem Fokin.

Revision 1.175 / (download) - annotate - [select for diffs], Wed Nov 16 00:24:03 2016 UTC (7 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.174: +12 -6 lines
Diff to previous 1.174 (colored)

The target validity check used window_pane_visible but that may be false
if the pane is zoomed, so instead add a new function to just check if
the pane is actually on screen (most commands still want to accept panes
invisible by zoom). Also reject panes outside the window for various
special targets. Problem reported by Sean Haugh.

Revision 1.174 / (download) - annotate - [select for diffs], Wed Oct 19 09:22:07 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.173: +24 -17 lines
Diff to previous 1.173 (colored)

Alerts are too slow, so rather than walking all sessions and windows,
add a link of winlinks to each window and a pointer to the session to
each winlink. Also rewrite the alerts processing to return to the old
behaviour (alert in any window sets the flag on any winlink).

Revision 1.173 / (download) - annotate - [select for diffs], Tue Oct 18 07:38:16 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.172: +2 -2 lines
Diff to previous 1.172 (colored)

Store the right size in the pipe offset for pipe-pane.

Revision 1.172 / (download) - annotate - [select for diffs], Sun Oct 16 22:06:40 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.171: +4 -4 lines
Diff to previous 1.171 (colored)

Use the notify name string instead of going via an enum and change
existing hooks to use notifys instead.

Revision 1.171 / (download) - annotate - [select for diffs], Sat Oct 15 09:27:52 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.170: +6 -6 lines
Diff to previous 1.170 (colored)

Give window_create and window_create1 better names.

Revision 1.170 / (download) - annotate - [select for diffs], Thu Oct 13 20:27:27 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.169: +2 -2 lines
Diff to previous 1.169 (colored)

Add support for BCE (background colour erase). This makes various escape
sequences (notable EL and ED but also IL, DL, ICH, DCH) create blank
cells using the current background colour rather than the default
colour.

On modern systems BCE doesn't really have many benefits, but most other
terminals now support it, some (lazy) applications rely on it, and it is
not hard to include now that we have pane background colours anyway.

Mostly written by Sean Haugh.

Revision 1.169 / (download) - annotate - [select for diffs], Tue Oct 11 13:21:59 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.168: +12 -8 lines
Diff to previous 1.168 (colored)

Add static in window-*.c and move some internal functions out of tmux.h.

Revision 1.168 / (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.167: +2 -1 lines
Diff to previous 1.167 (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.167 / (download) - annotate - [select for diffs], Wed Sep 28 08:30:44 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.166: +4 -1 lines
Diff to previous 1.166 (colored)

Rate limit TIOCSWINSZ on a timer to avoid programs getting hammered with
SIGWINCH when the size changes rapidly. To help a problem reported by
Rui Pinheiro.

Revision 1.166 / (download) - annotate - [select for diffs], Fri Sep 16 13:43:41 2016 UTC (7 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.165: +39 -17 lines
Diff to previous 1.165 (colored)

Swap watermarks from high (4096) to low (128) when we get full buffers
into the read callback several times in succession; swap back when we
see empty buffers several times. This hopefully limits how much programs
that print a lot for a long period can monopolize tmux (like large, fast
compiling), without penalizing programs that print a lot briefly (like
most curses applications). Helps a lot for me, the actual numbers may
need tweaking later.

Revision 1.165 / (download) - annotate - [select for diffs], Fri Jul 15 09:52:34 2016 UTC (7 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.164: +2 -2 lines
Diff to previous 1.164 (colored)

Tweak output of environment logging.

Revision 1.164 / (download) - annotate - [select for diffs], Fri Jul 15 09:28:32 2016 UTC (7 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.163: +2 -1 lines
Diff to previous 1.163 (colored)

Log environment to new panes.

Revision 1.163 / (download) - annotate - [select for diffs], Thu Jun 16 10:55:47 2016 UTC (7 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.162: +2 -1 lines
Diff to previous 1.162 (colored)

Allow a command to be specified to display-panes, similar to
command-prompt, rather than always just selecting the pane.

Revision 1.162 / (download) - annotate - [select for diffs], Wed Jun 15 09:13:46 2016 UTC (7 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.161: +28 -1 lines
Diff to previous 1.161 (colored)

Copy mode needs to keep the original grid intact so it can copy from it
if needed, so it disables reading from the pane. This can be problem
with some programs. So make tmux automatically exit all modes after 180
seconds of inactivity and if there is pending output.

Revision 1.161 / (download) - annotate - [select for diffs], Mon Jun 6 07:24:31 2016 UTC (7 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.160: +9 -5 lines
Diff to previous 1.160 (colored)

Insert new panes after the pane being split in the list rather than
always after the active pane. This is more sensible when doing it with
commands rather than keys.

Revision 1.160 / (download) - annotate - [select for diffs], Mon May 30 09:50:21 2016 UTC (7 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.159: +2 -2 lines
Diff to previous 1.159 (colored)

Cache the window styles and do not look up the window-style options
unless they have changed.

Revision 1.159 / (download) - annotate - [select for diffs], Fri Apr 29 15:00:48 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.158: +3 -1 lines
Diff to previous 1.158 (colored)

Add option to include status text in the pane borders. If
pane-border-status is set to "top" or "bottom" (rather than "off"),
every pane has a permanent top or bottom border containing the text from
pane-border-format.

Based on a diff sent long ago by Jonathan Slenders, mostly rewritten and
simplified by me.

Revision 1.158 / (download) - annotate - [select for diffs], Fri Apr 29 13:36:11 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.157: +4 -37 lines
Diff to previous 1.157 (colored)

The backoff timer is causing no end of trouble with disconnected clients
stopping data in attached ones. So get rid of it and see how we get on
with just a high watermark on each pane.

Revision 1.157 / (download) - annotate - [select for diffs], Tue Mar 1 12:05:15 2016 UTC (8 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.156: +5 -1 lines
Diff to previous 1.156 (colored)

Redraw status on mode entry and exit.

Revision 1.156 / (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.155: +2 -2 lines
Diff to previous 1.155 (colored)

I no longer use my SourceForge address so replace it.

Revision 1.155 / (download) - annotate - [select for diffs], Thu Dec 31 18:14:13 2015 UTC (8 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.154: +2 -2 lines
Diff to previous 1.154 (colored)

Use saved pipe buffer offset when writing to pipe, from Nicolas Viennot.

Revision 1.154 / (download) - annotate - [select for diffs], Sat Dec 19 08:43:04 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.153: +4 -2 lines
Diff to previous 1.153 (colored)

Make input off flag (selectp -d) apply to synchronize-panes too.

Revision 1.153 / (download) - annotate - [select for diffs], Wed Dec 16 21:50:38 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.152: +2 -2 lines
Diff to previous 1.152 (colored)

Add infrastructure to work out the best target given a pane or window
alone and use it to add pane_died and pane_exited hooks.

Revision 1.152 / (download) - annotate - [select for diffs], Tue Dec 15 00:00:01 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.151: +3 -3 lines
Diff to previous 1.151 (colored)

Make the marked pane a cmd_find_state.

Revision 1.151 / (download) - annotate - [select for diffs], Wed Dec 2 23:09:22 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.150: +3 -1 lines
Diff to previous 1.150 (colored)

Mark new active pane changed after pane lost in window, and after
break-pane. Reported by tim@.

Revision 1.150 / (download) - annotate - [select for diffs], Tue Nov 24 23:46:16 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.149: +4 -5 lines
Diff to previous 1.149 (colored)

Make environ_set va_args and use it to tidy up some calls. Also add a
missing word in manpage (from jmc).

Revision 1.149 / (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.148: +5 -5 lines
Diff to previous 1.148 (colored)

Use __unused rather than rolling our own.

Revision 1.148 / (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.147: +2 -2 lines
Diff to previous 1.147 (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.147 / (download) - annotate - [select for diffs], Sat Oct 31 08:13:58 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.146: +14 -12 lines
Diff to previous 1.146 (colored)

Because pledge(2) does not allow us to pass directory file descriptors
around, we can't use file descriptors for the working directory because
we will be unable to pass it to a privileged process to tell it where to
read or write files or spawn children. So move tmux back to using
strings for the current working directory. We try to check it exists
with access() when it is set but ultimately fall back to ~ if it fails
at time of use (or / if that fails too).

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

Move struct options into options.c.

Revision 1.145 / (download) - annotate - [select for diffs], Mon Sep 14 11:34:50 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.144: +25 -1 lines
Diff to previous 1.144 (colored)

When the active pane changes, redraw panes if the style has
changed. From Cam Hutchison.

Revision 1.144 / (download) - annotate - [select for diffs], Sat Aug 29 23:55:55 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.143: +1 -11 lines
Diff to previous 1.143 (colored)

Remove some old prototypes and unused functions.

Revision 1.143 / (download) - annotate - [select for diffs], Sat Aug 29 08:30:54 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.142: +13 -12 lines
Diff to previous 1.142 (colored)

Move alerts onto events rather than checking every loop.

Revision 1.142 / (download) - annotate - [select for diffs], Sat Aug 29 00:39:18 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.141: +3 -3 lines
Diff to previous 1.141 (colored)

Treat entering or leaving a mode as pane changed.

Revision 1.141 / (download) - annotate - [select for diffs], Sat Aug 29 00:29:15 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.140: +3 -5 lines
Diff to previous 1.140 (colored)

Better take on reducing the name timer. Again check for name changes in
the main loop after events that may have changed the pane, but do so at
most once every 500 millis. If the pane changed too soon, use a timer to
ensure that a check happens later.

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

Only set default title to hostname on screens that are being used for a
window pane, no point in calling gethostname() for temporary screens.

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

Revert previous; we do need a timer, until I have a better idea. We
can't do the name check every loop, because that is too expensive, and
we can't make sure it only happens infrequently because we have no idea
when the next change will happen.

Revision 1.138 / (download) - annotate - [select for diffs], Fri Aug 28 15:51:48 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.137: +1 -6 lines
Diff to previous 1.137 (colored)

We now only checking for name changes when the active pane has changed,
but that can only happen when we have already been woken up by a read
event, so there is no need for a timer, we can just check the changed
flag on the end of that read event (we already loop over the windows to
check for bells etc anyway).

Revision 1.137 / (download) - annotate - [select for diffs], Fri Aug 28 07:55:43 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.136: +2 -2 lines
Diff to previous 1.136 (colored)

Error messages should not have a trailing period.

Revision 1.136 / (download) - annotate - [select for diffs], Fri Aug 28 07:49:24 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.135: +2 -1 lines
Diff to previous 1.135 (colored)

Only do the automatic-rename dance if the pane has changed (seen output,
or new active pane).

Revision 1.135 / (download) - annotate - [select for diffs], Fri Jul 17 13:09:07 2015 UTC (8 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.134: +4 -4 lines
Diff to previous 1.134 (colored)

Do not call window_unzoom from window_destroy because it will try to add
a notification which will get confused because the reference count is
already zero and end up back in window_destroy and a double
free. Instead, just destroy the layouts directly. Noticed by Thomas
Adam.

Revision 1.134 / (download) - annotate - [select for diffs], Wed Jun 17 16:50:28 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.133: +26 -1 lines
Diff to previous 1.133 (colored)

Move the shuffle code from new-window -a into a function and add a -a
flag for move-window too. From Thomas Adam.

Revision 1.133 / (download) - annotate - [select for diffs], Mon Jun 15 10:58:01 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.132: +4 -1 lines
Diff to previous 1.132 (colored)

Add window_activity format, from Thomas Adam based on a diff originally
from propos6 at gmail dot com.

Revision 1.132 / (download) - annotate - [select for diffs], Thu Jun 4 11:43:51 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.131: +6 -1 lines
Diff to previous 1.131 (colored)

Add support for a single "marked pane". There is one marked pane in the
server at a time; it may be toggled or cleared with select-pane -m and
-M (the border is highlighted). A new target '~' or '{marked}' specifies
the marked pane to commands and it is the default target for the
swap-pane and join-pane -s flag (this makes them much simpler to use -
mark the source pane and then change to the target pane to run swapp or
joinp).

Revision 1.131 / (download) - annotate - [select for diffs], Tue May 12 22:40:38 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.130: +49 -9 lines
Diff to previous 1.130 (colored)

To replace c0-*, add a high watermark to the pty event, and also backoff
when the any of the ttys the pane is going to write to has buffered
enough data.

Revision 1.130 / (download) - annotate - [select for diffs], Mon May 11 10:10:16 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.129: +1 -41 lines
Diff to previous 1.129 (colored)

Remove the c0-* options which never really worked satisfactorily. Going
to try something else...

Revision 1.129 / (download) - annotate - [select for diffs], Thu May 7 11:42:56 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.128: +2 -2 lines
Diff to previous 1.128 (colored)

Style spacing nits.

Revision 1.128 / (download) - annotate - [select for diffs], Wed May 6 08:35:39 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.127: +2 -4 lines
Diff to previous 1.127 (colored)

Add a format window_linked which is 1 if a window has been linked
multiple times, also remove the default space in window_flags and use a
conditional to add it in window-status-format (this means additional
flags can be added in the option without extra spaces). From Thomas Adam
with tweaks by me.

Revision 1.127 / (download) - annotate - [select for diffs], Tue Apr 28 10:43:14 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.126: +2 -1 lines
Diff to previous 1.126 (colored)

Add select-layout -o to undo the last layout change (apply the previously
set layout).

Revision 1.126 / (download) - annotate - [select for diffs], Sat Apr 25 18:56:05 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.125: +51 -41 lines
Diff to previous 1.125 (colored)

Get rid of window_choose_list type.

Revision 1.125 / (download) - annotate - [select for diffs], Sat Apr 25 18:49:01 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.124: +2 -2 lines
Diff to previous 1.124 (colored)

Fix some char* -> char *.

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

Make message log a TAILQ.

Revision 1.123 / (download) - annotate - [select for diffs], Sat Apr 25 18:09:28 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.122: +31 -2 lines
Diff to previous 1.122 (colored)

Move the functions to convert ids from strings into session.c and window.c.

Revision 1.122 / (download) - annotate - [select for diffs], Wed Apr 22 15:30:11 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.121: +23 -45 lines
Diff to previous 1.121 (colored)

Change the windows array into an RB tree and fix some places where we
were only looking at the first winlink for a window in a session.

Revision 1.121 / (download) - annotate - [select for diffs], Wed Apr 22 15:05:03 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.120: +6 -12 lines
Diff to previous 1.120 (colored)

window_index is only used in one place (window_destroy) so inline it there.

Revision 1.120 / (download) - annotate - [select for diffs], Tue Apr 21 22:38:50 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.119: +2 -1 lines
Diff to previous 1.119 (colored)

Always format real layout even when zoomed.

Revision 1.119 / (download) - annotate - [select for diffs], Mon Apr 20 07:50:49 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.118: +2 -2 lines
Diff to previous 1.118 (colored)

Use a more sensible buffer size for flags string.

Revision 1.118 / (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.117: +24 -27 lines
Diff to previous 1.117 (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.117 / (download) - annotate - [select for diffs], Sun Apr 19 21:05:27 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.116: +3 -1 lines
Diff to previous 1.116 (colored)

Support setting the default window and pane background colours (window
and active pane via window-style and window-active-style options, an
individual pane by a new select-pane -P flag). From J Raynor.

Revision 1.116 / (download) - annotate - [select for diffs], Mon Feb 9 12:47:18 2015 UTC (9 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.115: +2 -2 lines
Diff to previous 1.115 (colored)

Entries in the window list can be NULL, prompted by a crash seen by Ben
Boeckel.

Revision 1.115 / (download) - annotate - [select for diffs], Mon Dec 15 10:04:18 2014 UTC (9 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.114: +3 -1 lines
Diff to previous 1.114 (colored)

Notify on zoom/unzoom, from George Nachmann.

Revision 1.114 / (download) - annotate - [select for diffs], Tue Oct 21 22:22:04 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.113: +5 -4 lines
Diff to previous 1.113 (colored)

Only redraw pane when it has actually changed.

Revision 1.113 / (download) - annotate - [select for diffs], Mon Aug 11 22:14:30 2014 UTC (9 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.112: +5 -4 lines
Diff to previous 1.112 (colored)

Add flags to selectp to enable and disable input to a pane, from Anish
Athalye.

Revision 1.112 / (download) - annotate - [select for diffs], Mon Jun 23 10:27:05 2014 UTC (9 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.111: +1 -4 lines
Diff to previous 1.111 (colored)

Allow keys and send-keys to invisible panes, from saggy-kun at users dot
sf dot net.

Revision 1.111 / (download) - annotate - [select for diffs], Thu Jun 5 22:14:29 2014 UTC (9 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.110: +1 -2 lines
Diff to previous 1.110 (colored)

Reset properly when c0-change-trigger is increased from zero so panes
don't get stuck.

Revision 1.110 / (download) - annotate - [select for diffs], Tue May 13 08:08:32 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.109: +40 -22 lines
Diff to previous 1.109 (colored)

If multiple arguments are given to new-session, new-window,
split-window, respawn-window or respawn-pane, pass them directly to
execvp() to help avoid quoting problems. One argument still goes to "sh
-c" like before. Requested by many over the years. Patch from J Raynor.

Revision 1.109 / (download) - annotate - [select for diffs], Thu May 8 06:03:30 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.108: +144 -129 lines
Diff to previous 1.108 (colored)

Both the two previous ways of navigating panes by direction have
irritating flaws:

a) The old way of always using the top or left if the choice is
ambiguous is annoying when the layout is unbalanced.

b) The new way of remembering the last used pane is annoying if the
layout is balanced and the leftmost is obvious to the user (because
clearly if we go right from the top-left in a tiled set of four we want
to end up in top-right, even if we were last using the bottom-right).

So instead, use a combination of both: if there is only one possible
pane alongside the current pane, move to it, otherwise choose the most
recently used of the choice.

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

Some more long lines.

Revision 1.107 / (download) - annotate - [select for diffs], Thu Apr 17 13:02:59 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.106: +10 -6 lines
Diff to previous 1.106 (colored)

Set PATH explicitly, either from client or session
environment. Previously it came from the session environment. From J
Raynor.

Revision 1.106 / (download) - annotate - [select for diffs], Thu Apr 17 11:38:35 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.105: +1 -5 lines
Diff to previous 1.105 (colored)

Remove some unnecessary includes and fix a typo.

Revision 1.105 / (download) - annotate - [select for diffs], Thu Apr 17 09:13:13 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.104: +8 -2 lines
Diff to previous 1.104 (colored)

Correct the dance to fix the active pane in join-pane by pulling the
(right) code from break-pane and window_remove_pane into a helper
function.

Revision 1.104 / (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.103: +1 -3 lines
Diff to previous 1.103 (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.103 / (download) - annotate - [select for diffs], Mon Mar 31 21:41:07 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.102: +9 -5 lines
Diff to previous 1.102 (colored)

Don't segfaut when the parent of the layout cell is NULL, from Thomas Adam.

Revision 1.102 / (download) - annotate - [select for diffs], Sat Feb 22 18:01:10 2014 UTC (10 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.101: +4 -3 lines
Diff to previous 1.101 (colored)

Fix crash due to uninitialized lastwp member of layout_cell, reported by
Balazs Kezes.

Revision 1.101 / (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.100: +1 -11 lines
Diff to previous 1.100 (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.100 / (download) - annotate - [select for diffs], Tue Jan 28 22:19:17 2014 UTC (10 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.99: +73 -5 lines
Diff to previous 1.99 (colored)

Remember the last active pane in the top-bottom or left-right cell so
that it can be restored when moving back to that cell with selectp
-L/-R/etc. From Suraj N Kurapati.

Revision 1.99 / (download) - annotate - [select for diffs], Thu Oct 10 12:26:37 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.98: +9 -9 lines
Diff to previous 1.98 (colored)

Alter how tmux handles the working directory to internally use file
descriptors rather than strings.

- Each session still has a current working directory.

- New sessions still get their working directory from the client that
  created them or its attached session if any.

- New windows are created by default in the session working directory.

- The -c flag to new, neww, splitw allows the working directory to be
  overridden.

- The -c flag to attach let's the session working directory be changed.

- The default-path option has been removed.

To get the equivalent to default-path '.', do:

        bind c neww -c $PWD

To get the equivalent of default-path '~', do:

        bind c neww -c ~

This also changes the client identify protocol to be a set of messages rather
than one as well as some other changes that should make it easier to make
backwards-compatible protocol changes in future.

Revision 1.98 / (download) - annotate - [select for diffs], Thu Oct 10 11:59:23 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.97: +2 -1 lines
Diff to previous 1.97 (colored)

Clear window->flags when clearing winlinks

When clearing WINLINK_ALERTFLAGS for all sessions, we must also, for
that window, clear the window->flags as well, otherwise sessions may
well still see flags for winlinks long since cleared.

This therefore introduces WINDOW_ALERTFLAGS to help with this.

Revision 1.97 / (download) - annotate - [select for diffs], Tue Mar 26 10:54:48 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.96: +5 -6 lines
Diff to previous 1.96 (colored)

Fix compiler warnings, missing #include. From Thomas Adam.

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

Revert the command-prefix change which breaks sequences of commands.

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

Set pane resize flag when needed.

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

Don't zoom windows with one pane, from Romain Francoise.

Revision 1.93 / (download) - annotate - [select for diffs], Sun Mar 24 09:57:59 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.92: +56 -2 lines
Diff to previous 1.92 (colored)

Add resize-pane -Z to temporary zoom the active pane to occupy the full
window or unzoom (restored to the normal layout) if it already zoomed,
bound to C-b z by default. The pane is unzoomed on pretty much any
excuse whatsoever.

We considered making this a new layout but the requirements are quite
different from layouts so decided it is better as a special case. Each
current layout cell is saved, a temporary one-cell layout generated and
all except the active pane set to NULL.

Prompted by suggestions and scripts from several. Thanks to Aaron Jensen
and Thiago Padilha for testing an earlier version.

Revision 1.92 / (download) - annotate - [select for diffs], Sun Mar 24 09:25:04 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.91: +1 -10 lines
Diff to previous 1.91 (colored)

Do pane resize ioctls once at the end of the server loop rather than
immediately.

Revision 1.91 / (download) - annotate - [select for diffs], Sun Mar 24 09:21:27 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.90: +17 -3 lines
Diff to previous 1.90 (colored)

Add option command-prefix which is automatically prepended to any
command (apart from a naked default-shell). The default is "exec ".

Revision 1.90 / (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.89: +1 -3 lines
Diff to previous 1.89 (colored)

No more lint means no more ARGSUSED.

Revision 1.89 / (download) - annotate - [select for diffs], Tue Feb 5 11:08:59 2013 UTC (11 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.88: +5 -5 lines
Diff to previous 1.88 (colored)

Automatically reflow wrapped lines when a pane is resized, requested by
many over the years and finally implemented by Richard Woodbury.

Revision 1.88 / (download) - annotate - [select for diffs], Thu Jan 17 00:11:22 2013 UTC (11 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.87: +1 -2 lines
Diff to previous 1.87 (colored)

Remove the layout undo/redo code which never really worked.

Revision 1.87 / (download) - annotate - [select for diffs], Tue Nov 27 20:08:42 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.86: +13 -7 lines
Diff to previous 1.86 (colored)

Support the 47 and 1047 SM and RM sequences (alternate screen without
cursor), requested by I forget who ages ago.

Revision 1.86 / (download) - annotate - [select for diffs], Fri Oct 26 14:35:42 2012 UTC (11 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.85: +2 -2 lines
Diff to previous 1.85 (colored)

Make mouse event structure clearer by defining events (up, click, drag)
and simplifying how buttons and wheels are represented, from Ailin
Nemui. Should be no functional changes.

Revision 1.85 / (download) - annotate - [select for diffs], Thu Oct 25 11:14:46 2012 UTC (11 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.84: +2 -2 lines
Diff to previous 1.84 (colored)

Fix bad size in memcpy from Romain Francoise.

Revision 1.84 / (download) - annotate - [select for diffs], Tue Aug 21 10:00:33 2012 UTC (11 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.83: +13 -8 lines
Diff to previous 1.83 (colored)

Fix up window reference counting and don't crash if the rename timer
fires while the window is dead but still referenced. Fixes problem
reported by Michael Scholz.

Revision 1.83 / (download) - annotate - [select for diffs], Sat Aug 11 06:45:33 2012 UTC (11 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.82: +11 -1 lines
Diff to previous 1.82 (colored)

Instead of numbering choose mode items 0-9a-z and then nothing, number
them all and if there are more than 10 use a prompt when 0-9 is
pressed. From Thomas Adam.

Revision 1.82 / (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.81: +15 -24 lines
Diff to previous 1.81 (colored)

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

Revision 1.81 / (download) - annotate - [select for diffs], Sun Jul 8 07:27:32 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.80: +29 -1 lines
Diff to previous 1.80 (colored)

Clear flags across all sessions, from Thomas Adam.

Revision 1.80 / (download) - annotate - [select for diffs], Mon May 28 08:55:43 2012 UTC (11 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.79: +10 -9 lines
Diff to previous 1.79 (colored)

Use default-shell not _PATH_BSHELL to spawn commands, pointed out by
Dennis G?nnewig and Thomas Adam.

Revision 1.79 / (download) - annotate - [select for diffs], Sun Apr 8 06:47:26 2012 UTC (12 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.78: +3 -3 lines
Diff to previous 1.78 (colored)

Do not fire name timer when automatic-rename is off, from Tim Ruehsen a
while ago.

Revision 1.78 / (download) - annotate - [select for diffs], Sun Apr 1 20:53:47 2012 UTC (12 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.77: +3 -3 lines
Diff to previous 1.77 (colored)

Minor style nits - return ().

Revision 1.77 / (download) - annotate - [select for diffs], Sun Apr 1 13:18:38 2012 UTC (12 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.76: +2 -1 lines
Diff to previous 1.76 (colored)

Add a layout history which can be stepped through with select-layout -u
and -U commands (bound to 'u' and 'U' by default).

Revision 1.76 / (download) - annotate - [select for diffs], Tue Mar 20 14:06:44 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.75: +3 -2 lines
Diff to previous 1.75 (colored)

Check changes_timer with event_initialized before event_del.

Revision 1.75 / (download) - annotate - [select for diffs], Tue Mar 20 11:01:00 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.74: +41 -1 lines
Diff to previous 1.74 (colored)

Add a simple form of output rate limiting by counting the number of
certain C0 sequences (linefeeds, backspaces, carriage returns) and if it
exceeds a threshold (current default 50/millisecond), start to redraw
the pane every 100 milliseconds instead of making each change as it
comes. Two configuration options - c0-change-trigger and
c0-change-interval.

This makes tmux much more responsive under very fast output (for example
yes(1) or accidentally cat'ing a large file) but may not be perfect on
all terminals and connections - feedback very welcome, particularly
where this change has a negative rather than positive effect (making it
off by default is a possibility).

After much experimentation based originally on a request Robin Lee
Powell (which ended with a completely different solution), this idea
from discussion with Ailin Nemui.

Revision 1.74 / (download) - annotate - [select for diffs], Sat Mar 17 22:35:09 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.73: +2 -1 lines
Diff to previous 1.73 (colored)

Add notify hooks for various events, the functions are currently empty
stubs but will be filled in for control mode later. From George Nachman.

Revision 1.73 / (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.72: +3 -2 lines
Diff to previous 1.72 (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.72 / (download) - annotate - [select for diffs], Thu Feb 2 00:10:12 2012 UTC (12 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.71: +9 -1 lines
Diff to previous 1.71 (colored)

Move window name changes into wrapper function window_set_name, from
George Nachman.

Revision 1.71 / (download) - annotate - [select for diffs], Mon Jan 30 09:39:34 2012 UTC (12 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.70: +31 -3 lines
Diff to previous 1.70 (colored)

Give each window a unique id, like panes but prefixed with @. Based on
work from George Nachman.

Revision 1.70 / (download) - annotate - [select for diffs], Sun Jan 29 02:22:11 2012 UTC (12 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.69: +4 -4 lines
Diff to previous 1.69 (colored)

Call bufferevent_free before closing file descriptor associated with it
or bugs in $EventMechanism on $OtherOS makes libevent get it's knickers
in a twist. From Dylan Alex Simon.

Revision 1.69 / (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.68: +11 -9 lines
Diff to previous 1.68 (colored)

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

Revision 1.68 / (download) - annotate - [select for diffs], Sun Sep 25 18:53:04 2011 UTC (12 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.67: +2 -2 lines
Diff to previous 1.67 (colored)

Reject $SHELL if it is not a full path.

Revision 1.67 / (download) - annotate - [select for diffs], Wed Aug 24 10:29:57 2011 UTC (12 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.66: +3 -3 lines
Diff to previous 1.66 (colored)

Add pane-base-index option, from Ben Barbour.

Revision 1.66 / (download) - annotate - [select for diffs], Sun Jun 5 10:53:05 2011 UTC (12 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.65: +52 -8 lines
Diff to previous 1.65 (colored)

Get rid of the layout string code which tries to walk through the layout
hierarchy and instead just look at what panes are actually in the window.

Revision 1.65 / (download) - annotate - [select for diffs], Mon Apr 18 20:57:16 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.64: +3 -2 lines
Diff to previous 1.64 (colored)

The mouse should only work in copy mode if mode-mouse is set, not just
mouse-select-pane.

Revision 1.64 / (download) - annotate - [select for diffs], Sun Mar 27 20:27:27 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.63: +31 -2 lines
Diff to previous 1.63 (colored)

Give each pane created in a tmux server a unique id (starting from 0),
put it in the TMUX_PANE environment variable and accept it as a
target. Suggested by and with testing and tweaks from Ben Boeckel.

Revision 1.63 / (download) - annotate - [select for diffs], Tue Jan 25 22:31:50 2011 UTC (13 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.62: +16 -10 lines
Diff to previous 1.62 (colored)

Check if the index is in use and fail before creating the child process,
rather than leaving a stray child on failure.

Revision 1.62 / (download) - annotate - [select for diffs], Sat Jan 8 01:52:37 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.61: +3 -6 lines
Diff to previous 1.61 (colored)

Move all calls to fcntl(...O_NONBLOCK) into a function and clear the
flag on the stdio file descriptors before closing them (fixes things
like "tmux ls && cat").

Revision 1.61 / (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.60: +27 -1 lines
Diff to previous 1.60 (colored)

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

Revision 1.60 / (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.59: +9 -1 lines
Diff to previous 1.59 (colored)

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

Revision 1.59 / (download) - annotate - [select for diffs], Sun Nov 14 08:58:25 2010 UTC (13 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.58: +4 -2 lines
Diff to previous 1.58 (colored)

Don't allow last and active window to become the same - a very bad move
when the active window is closed and freed. Reported by sthen@.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Oct 23 13:04:34 2010 UTC (13 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.57: +11 -5 lines
Diff to previous 1.57 (colored)

Add a last-pane command (bound to ; by default). Requested ages ago by
somebody whose name I have forgotten.

Revision 1.57 / (download) - annotate - [select for diffs], Sat Oct 23 12:51:51 2010 UTC (13 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.56: +6 -4 lines
Diff to previous 1.56 (colored)

When removing a pane, don't change the active pane unless the active
pane is actually the one being removed.

Revision 1.56 / (download) - annotate - [select for diffs], Sat Oct 16 08:31:55 2010 UTC (13 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.55: +3 -3 lines
Diff to previous 1.55 (colored)

Trying to set FD_CLOEXEC on every fd is a lost cause, just use
closefrom() before exec.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Aug 25 19:19:43 2010 UTC (13 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.54: +3 -2 lines
Diff to previous 1.54 (colored)

When destroying a pane, reset any mode (which reenables pane
bufferevent) before freeing the bufferevent.

Revision 1.54 / (download) - annotate - [select for diffs], Thu Aug 19 18:29:01 2010 UTC (13 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored)

Do not call event_del() for signals after fork(), just use sigaction()
directly instead - calling libevent functions after fork() w/o
event_reinit() is a bad idea, even if in this case it was harmless.

Revision 1.53 / (download) - annotate - [select for diffs], Wed Jul 14 18:37:49 2010 UTC (13 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.52: +28 -5 lines
Diff to previous 1.52 (colored)

Make pane/window wrapping more logical (so with 10 windows, +10 from
window 5 stays in the same place), and tidy the code. From Tiago Cunha.

Revision 1.52 / (download) - annotate - [select for diffs], Mon Jun 21 01:46:36 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.51: +23 -1 lines
Diff to previous 1.51 (colored)

Extend the -t:+ and -t:- window targets for next and previous window to
accept an offset such as -t:+2. From Tiago Cunha.

Revision 1.51 / (download) - annotate - [select for diffs], Sun May 23 19:42:19 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.50: +5 -5 lines
Diff to previous 1.50 (colored)

Pass in the session, rather than the client, to window modes' key()
function. We were only ever using the client to find the session anyway.

This allows send-key to work properly for manipulating copy mode from
outside tmux.

From Micah Cowan.

Revision 1.50 / (download) - annotate - [select for diffs], Tue May 4 17:28:16 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

Put this back in with the initialisation in the right order.

Revision 1.49 / (download) - annotate - [select for diffs], Tue May 4 08:48:06 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.48: +1 -1 lines
Diff to previous 1.48 (colored)

Revert last change, it appears to be broken somehow.

Revision 1.48 / (download) - annotate - [select for diffs], Mon May 3 16:06:32 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)

Make signal handler setup/teardown two common functions instead of six,
and reset SIGCHLD after fork to fix problems with some shells. From
Romain Francois.

Revision 1.47 / (download) - annotate - [select for diffs], Sun Apr 4 19:02:09 2010 UTC (14 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.46: +7 -23 lines
Diff to previous 1.46 (colored)

Run job commands explicitly in the global enviroment (which can be
modified with setenv -g) rather than with the environment tmux started
with.

Revision 1.46 / (download) - annotate - [select for diffs], Sun Apr 4 18:48:37 2010 UTC (14 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.45: +13 -20 lines
Diff to previous 1.45 (colored)

Squash a function that is only called in a callback into the callback
function.

Revision 1.45 / (download) - annotate - [select for diffs], Mon Mar 22 19:07:52 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.44: +111 -1 lines
Diff to previous 1.44 (colored)

Support up, down, left, right movement through panes with -UDLR flags to
select-pane.

Also REMOVE the up- and down-pane commands: equivalent behaviour is now
available using -t :.+ and -t :.-.

Revision 1.44 / (download) - annotate - [select for diffs], Mon Mar 22 19:02:54 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.43: +76 -1 lines
Diff to previous 1.43 (colored)

New input parser based on http://vt100.net/emu/dec_ansi_parser.

Revision 1.43 / (download) - annotate - [select for diffs], Sat Feb 6 17:15:33 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.42: +1 -4 lines
Diff to previous 1.42 (colored)

Instead of bailing out on the first configuration file error, carry on,
collecting all the errors, then start with the active window in more mode
displaying them.

Revision 1.42 / (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.41: +6 -6 lines
Diff to previous 1.41 (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.41 / (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.40: +5 -3 lines
Diff to previous 1.40 (colored)

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

Revision 1.40 / (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.39: +3 -1 lines
Diff to previous 1.39 (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.39 / (download) - annotate - [select for diffs], Fri Nov 13 17:33:07 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.38: +2 -4 lines
Diff to previous 1.38 (colored)

Destroy panes immediately rather than checking them all every loop.

Revision 1.38 / (download) - annotate - [select for diffs], Wed Nov 4 23:54:57 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.37: +6 -9 lines
Diff to previous 1.37 (colored)

Change window name change to use a timer event rather than a gettimeofday()
check every loop.

Revision 1.37 / (download) - annotate - [select for diffs], Wed Nov 4 22:43:11 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.36: +40 -13 lines
Diff to previous 1.36 (colored)

Convert the window pane (pty master side) fd over to use a bufferevent.

The evbuffer API is very similar to the existing tmux buffer API so this was
remarkably painless. Not many possible ways to do it, I suppose.

Revision 1.36 / (download) - annotate - [select for diffs], Wed Nov 4 22:02:38 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.35: +4 -5 lines
Diff to previous 1.35 (colored)

Switch window pane pipe redirect fd over to a bufferevent.

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

Initial changes to move tmux to libevent.

This moves the client-side loops are pretty much fully over to event-based only
(tmux.c and client.c) but server-side (server.c and friends) treats libevent as
a sort of clever poll, waking up after every event to run various things.

Moving the server stuff over to bufferevents and timers and so on will come
later.

Revision 1.34 / (download) - annotate - [select for diffs], Thu Oct 22 12:30:00 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

Only redraw the pane when changing mode, not the entire window.

Revision 1.33 / (download) - annotate - [select for diffs], Mon Oct 19 13:18:13 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.32: +4 -1 lines
Diff to previous 1.32 (colored)

Stop updating the screen when not in output mode, stops copy mode getting
confused.

Revision 1.32 / (download) - annotate - [select for diffs], Sun Oct 11 10:04:27 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.31: +18 -1 lines
Diff to previous 1.31 (colored)

Add a pipe-pane command to allow a pane to be piped to a shell command, for
example:

	pipe-pane 'cat >~/out'

No arguments stops outputing and closes the pipe; the -o flag toggles a pipe
and on and off (useful for key bindings).

Suggested by espie@.

Revision 1.31 / (download) - annotate - [select for diffs], Sun Oct 11 07:01:10 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.30: +8 -10 lines
Diff to previous 1.30 (colored)

Clean up by introducing a wrapper struct for mouse clicks rather than passing
three u_chars around.

As a side-effect this fixes incorrectly rejecting high cursor positions
(because it was comparing them as signed char), reported by Tom Doherty.

Revision 1.30 / (download) - annotate - [select for diffs], Sat Oct 10 15:29:34 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.29: +7 -5 lines
Diff to previous 1.29 (colored)

Accept key and mouse input for keys in zombified windows if they are in a mode..

Revision 1.29 / (download) - annotate - [select for diffs], Sat Oct 10 14:51:16 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.28: +18 -1 lines
Diff to previous 1.28 (colored)

New option, mouse-select-pane. If on, the mouse may be used to select the
current pane.

Suggested by sthen@ and also by someone else ages ago who I have forgotten.

Revision 1.28 / (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.27: +5 -5 lines
Diff to previous 1.27 (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.27 / (download) - annotate - [select for diffs], Fri Oct 9 07:27:00 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.26: +15 -3 lines
Diff to previous 1.26 (colored)

Add a simple synchronize-panes window option: when set, all input to any pane
that is part of the window is also sent to all other panes in the same
window. Suggested by several, most recently Tomasz Pajor.

Revision 1.26 / (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.25: +2 -2 lines
Diff to previous 1.25 (colored)

Regularise some fatal messages.

Revision 1.25 / (download) - annotate - [select for diffs], Wed Sep 16 12:35:04 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.24: +11 -2 lines
Diff to previous 1.24 (colored)

Rather than constructing an entire termios struct from ttydefaults.h, just let
forkpty do it and then alter the bits that should be changed after fork. A
little neater and more portable.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Sep 1 14:40:33 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.23: +7 -1 lines
Diff to previous 1.23 (colored)

If forking a login shell or if SHELL is otherwise not useful, set it to the
default shell. Based on a diff from martynas@.

Revision 1.23 / (download) - annotate - [select for diffs], Tue Sep 1 13:09:50 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.22: +18 -42 lines
Diff to previous 1.22 (colored)

When using tmux as a login shell, there is currently no way to specify a shell
to be used as a login shell inside tmux, so add a default-shell session option.
This sets the shell invoked as a login shell when the default-command option is
empty.

The default option value is whichever of $SHELL, getpwuid(getuid())'s pw_shell
or /bin/sh is valid first.

Based on a diff from martynas@, changed by me to be a session option rather
than a window option.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Aug 13 20:11:58 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.21: +15 -13 lines
Diff to previous 1.21 (colored)

Add a base-index session option to specify the first index checked when looking
for an index for a new window.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Aug 13 19:04:00 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.20: +7 -6 lines
Diff to previous 1.20 (colored)

When creating a new session from the command-line where there is an external
terminal, copy the termios(4) special characters and use them for new windows
created in the new session. Suggested by Theo.

Revision 1.20 / (download) - annotate - [select for diffs], Wed Aug 12 09:14:25 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.19: +6 -2 lines
Diff to previous 1.19 (colored)

When started as the shell, __progname contains a leading -, so hardcode "tmux"
for socket path and log files, and strip it when working out the shell.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Aug 11 21:28:11 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.18: +16 -5 lines
Diff to previous 1.18 (colored)

Have the client pass its stdin fd to the server when identifying itself and
have the server use that rather than reopening the tty. If the fd isn't given,
use the old behaviour (so no need for a version change).

This allows tmux to be used as the shell, so also change so that when working
out the command to execute if default-command is empty (the default), tmux will
try not execute itself.

Revision 1.18 / (download) - annotate - [select for diffs], Sat Aug 8 21:52:43 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.17: +27 -12 lines
Diff to previous 1.17 (colored)

Infrastructure and commands to manage the environment for processes started
within tmux.

There is a global environment, copied from the external environment when the
server is started and each sesssion has an (initially empty) session
environment which overrides it.

New commands set-environment and show-environment manipulate or display the
environments.

A new session option, update-environment, is a space-separated list of
variables which are updated from the external environment into the session
environment every time a new session is created - the default is DISPLAY.

Revision 1.17 / (download) - annotate - [select for diffs], Tue Jul 28 06:48:44 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

If select-layout is not given an argument, repply the last layout used in the
window, if any.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Jul 22 21:34:36 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.15: +3 -6 lines
Diff to previous 1.15 (colored)

window_add_pane cannot fail, so remove the unused cause argument and don't
bother to check for a NULL return.

Revision 1.15 / (download) - annotate - [select for diffs], Tue Jul 21 19:54:22 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.14: +5 -9 lines
Diff to previous 1.14 (colored)

Make some functions which return unused values void (mostly found by lint) and
tweak a redundant expression in window_pane_set_mode.

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jul 19 13:21:40 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.13: +20 -35 lines
Diff to previous 1.13 (colored)

Improved layout code.

Each window now has a tree of layout cells associated with it. In this tree,
each node is either a horizontal or vertical cell containing a list of other
cells running from left-to-right or top-to-bottom, or a leaf cell which is
associated with a pane.

The major functional changes are:

- panes may now be split arbitrarily both horizontally (splitw -h, C-b %) and
  vertically (splitw -v, C-b ");
- panes may be resized both horizontally and vertically (resizep -L/-R/-U/-D,
  bound to C-b left/right/up/down and C-b M-left/right/up/down);
- layouts are now applied and then may be modified by resizing or splitting
  panes, rather than being fixed and reapplied when the window is resized or
  panes are added;
- manual-vertical layout is no longer necessary, and active-only layout is gone
  (but may return in future);
- the main-pane layouts now reduce the size of the main pane to fit all panes
  if possible.

Thanks to all who tested.

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: +16 -1 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], Wed Jul 15 08:00:49 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.11: +14 -1 lines
Diff to previous 1.11 (colored)

The man page says that kill-window removes the window entirely, unlinking it
from any sessions. In fact the implementation only affected the current
session, making it the same as unlink-window but destroying the window if it
was linked into only one session (unlinkw gives an error). Change the behaviour
to match what it documented and was originally intended.

Revision 1.11 / (download) - annotate - [select for diffs], Tue Jul 14 16:52:50 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

Don't accept input to a window if it not visible.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Jul 14 07:23:36 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.9: +20 -2 lines
Diff to previous 1.9 (colored)

Get rid of the PANE_HIDDEN flag in favour of a function, and moving the
decision for whether or not a pane should be drawn out of the layout code and
into the redraw code.

This is needed for the new layout design, getting it in now to make that easier
to work on.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jul 13 10:43:52 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.8: +5 -1 lines
Diff to previous 1.8 (colored)

Support "alternate screen" mode (terminfo smcup/rmcup) typically used by full
screen interactive programs to preserve the screen contents. When activated, it
saves a copy of the visible grid and disables scrolling into and resizing out
of the history; when deactivated the visible data is restored and the history
reenabled.

Revision 1.8 / (download) - annotate - [select for diffs], Wed Jul 8 05:26:45 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.7: +33 -3 lines
Diff to previous 1.7 (colored)

Just appending -l to $SHELL to create a login shell is wrong: -l is not POSIX,
and some people may use shells which do not support it. Instead, make an empty
default-command option mean a login shell, and fork it with a - in argv[0]
which is the method used by login(1).

Also fix the automatic-rename code to handle this correctly and to strip a
leading - if present.

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

Rename the global options variables to be shorter and to make session options
clear. No functional change, getting this out of the way to make later options
changes easier.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Jun 25 06:15:04 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.5: +1 -16 lines
Diff to previous 1.5 (colored)

Miscellaneous unused functions, including one which was basically a
duplicate. Found by lint.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Jun 24 22:49:56 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.4: +16 -12 lines
Diff to previous 1.4 (colored)

Change find-window and monitor-content to use fnmatch(3). For convenience and
compatibility, *s are implicitly added at the start and end of the pattern.

Also display the line number and the entire line in the results, and lose the
nasty section_string function and the now empty util.c file.

Initially from Tiago Cunha.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jun 24 22:04:18 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.3: +17 -38 lines
Diff to previous 1.3 (colored)

Add a dedicated function to convert a line into a string and use it to simplify the search window function.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jun 23 20:17:30 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.2: +7 -1 lines
Diff to previous 1.2 (colored)

If a pane is "zombified" (remain-on-exit flag), don't continue to queue key and
mouse input for it (otherwise they are processed after respawn).

Revision 1.2 / (download) - annotate - [select for diffs], Fri Jun 5 07:18:37 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

strdup the input to putenv to avoid in one case passing a string that is later
freed and in the other const strings.

looks sane to millert, ok ray

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.