OpenBSD CVS

CVS log for src/usr.bin/tmux/tmux.h


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.1217 / (download) - annotate - [select for diffs], Sun May 19 03:27:58 2024 UTC (3 hours, 51 minutes ago) by jsg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1216: +1 -3 lines
Diff to previous 1.1216 (colored)

remove prototype with no matching function

Revision 1.1216 / (download) - annotate - [select for diffs], Sat May 18 08:51:26 2024 UTC (22 hours, 27 minutes ago) by jsg
Branch: MAIN
Changes since 1.1215: +1 -7 lines
Diff to previous 1.1215 (colored)

remove prototypes with no matching function; ok nicm@

Revision 1.1215 / (download) - annotate - [select for diffs], Wed May 15 09:59:12 2024 UTC (3 days, 21 hours ago) by nicm
Branch: MAIN
Changes since 1.1214: +2 -1 lines
Diff to previous 1.1214 (colored)

Use default-shell for command prompt #() and popups as well

Revision 1.1214 / (download) - annotate - [select for diffs], Wed Apr 10 07:36:25 2024 UTC (5 weeks, 3 days ago) by nicm
Branch: MAIN
Changes since 1.1213: +2 -2 lines
Diff to previous 1.1213 (colored)

Add an option allow-set-title to forbid applications from changing the
pane title, from someone in GitHub issue 3930.

Revision 1.1213 / (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.1212: +2 -2 lines
Diff to previous 1.1212 (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.1212 / (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.1211: +2 -1 lines
Diff to previous 1.1211 (colored)

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

Revision 1.1211 / (download) - annotate - [select for diffs], Fri Sep 15 15:49:05 2023 UTC (8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.1210: +8 -16 lines
Diff to previous 1.1210 (colored)

Change UTF-8 combining to inspect the previous character at the cursor
position rather than keeping the last character from the input stream,
this is how most terminals work and fixes problems with displaying these
characters in vim. GitHub issue 3600.

Revision 1.1210 / (download) - annotate - [select for diffs], Fri Sep 15 06:31:49 2023 UTC (8 months ago) by nicm
Branch: MAIN
Changes since 1.1209: +7 -5 lines
Diff to previous 1.1209 (colored)

Add -t to source-file, GitHub issue 3473.

Revision 1.1209 / (download) - annotate - [select for diffs], Sat Sep 2 20:03:10 2023 UTC (8 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.1208: +4 -4 lines
Diff to previous 1.1208 (colored)

Request terminal colours again on SIGWINCH but at most once every 30
seconds, GitHub issue 3582.

Revision 1.1208 / (download) - annotate - [select for diffs], Sat Sep 2 09:17:23 2023 UTC (8 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.1207: +2 -1 lines
Diff to previous 1.1207 (colored)

Setulc only does RGB colour so add Setulc1 to do non-RGB colours, GitHub
issue 3627.

Revision 1.1207 / (download) - annotate - [select for diffs], Fri Sep 1 14:29:11 2023 UTC (8 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.1206: +18 -2 lines
Diff to previous 1.1206 (colored)

Rewrite combined character handling to be more consistent and to support
newer Unicode combined characters (which we have to "know" are combined
since they are not width zero). GitHub issue 3600.

Revision 1.1206 / (download) - annotate - [select for diffs], Thu Aug 17 14:10:28 2023 UTC (9 months ago) by nicm
Branch: MAIN
Changes since 1.1205: +7 -2 lines
Diff to previous 1.1205 (colored)

Add a session, pane and user mouse range types for the status line and
add format variables for mouse_status_line and mouse_status_range so
they can be associated with different commands in the key bindings.
GitHub issue 3652.

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

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

Revision 1.1204 / (download) - annotate - [select for diffs], Tue Aug 8 08:21:30 2023 UTC (9 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.1203: +2 -1 lines
Diff to previous 1.1203 (colored)

Add flag to next-prompt/previous-prompt to go to command output instead,
from Magnus Gross.

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

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

Revision 1.1202 / (download) - annotate - [select for diffs], Tue Aug 8 07:41:04 2023 UTC (9 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.1201: +4 -2 lines
Diff to previous 1.1201 (colored)

Extend the menu drawing function to support custom characters and
styles, from Alexis Hildebrandt.

Revision 1.1201 / (download) - annotate - [select for diffs], Mon Jul 10 09:24:53 2023 UTC (10 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.1200: +10 -4 lines
Diff to previous 1.1200 (colored)

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

Revision 1.1200 / (download) - annotate - [select for diffs], Mon Jul 3 16:47:43 2023 UTC (10 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.1199: +2 -1 lines
Diff to previous 1.1199 (colored)

Add support for marking lines with a shell prompt based on the OSC 133
extension, from Munif Tanjim in GitHub issue 3596.

Revision 1.1199 / (download) - annotate - [select for diffs], Thu Jun 8 11:17:29 2023 UTC (11 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.1198: +8 -8 lines
Diff to previous 1.1198 (colored)

Fix mismatch between function prototype and definition, from Anindya
Mukherjee.

Revision 1.1198 / (download) - annotate - [select for diffs], Mon May 8 10:03:39 2023 UTC (12 months, 1 week ago) by tb
Branch: MAIN
Changes since 1.1197: +2 -2 lines
Diff to previous 1.1197 (colored)

Reorder struct grid_cell_entry

On aarch64 with llvm 15, the new -Wunaligned-access emits noise on every
one of tmux's source files. This avoids this warning by moving a u_char
to the end of the struct. This does not change the size of the struct on
any architecture.

ok nicm

Revision 1.1197 / (download) - annotate - [select for diffs], Tue Apr 25 09:31:50 2023 UTC (12 months, 3 weeks ago) by nicm
Branch: MAIN
Changes since 1.1196: +14 -14 lines
Diff to previous 1.1196 (colored)

Tidy tparm wrapper functions to have more obvious names and check tparm
return value.

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

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

Revision 1.1195 / (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.1194: +2 -1 lines
Diff to previous 1.1194 (colored)

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

Revision 1.1194 / (download) - annotate - [select for diffs], Sun Feb 5 21:15:33 2023 UTC (15 months, 1 week ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.1193: +2 -1 lines
Diff to previous 1.1193 (colored)

Extend display-message to work for control clients. GitHub issue 3449.

Revision 1.1193 / (download) - annotate - [select for diffs], Fri Jan 20 21:36:00 2023 UTC (15 months, 4 weeks ago) by nicm
Branch: MAIN
Changes since 1.1192: +5 -5 lines
Diff to previous 1.1192 (colored)

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

Revision 1.1192 / (download) - annotate - [select for diffs], Mon Jan 16 11:26:14 2023 UTC (16 months ago) by nicm
Branch: MAIN
Changes since 1.1191: +7 -6 lines
Diff to previous 1.1191 (colored)

Mark keys sent by command and skip paste handling for them.

Revision 1.1191 / (download) - annotate - [select for diffs], Thu Jan 12 18:49:11 2023 UTC (16 months ago) by nicm
Branch: MAIN
Changes since 1.1190: +2 -1 lines
Diff to previous 1.1190 (colored)

Have tmux recognise pasted texts wrapped in bracket paste sequences,
rather than only forwarding them to the program inside. From Andrew
Onyshchuk in GitHub issue 3431.

Revision 1.1190 / (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.1189: +5 -2 lines
Diff to previous 1.1189 (colored)

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

Revision 1.1189 / (download) - annotate - [select for diffs], Tue Jan 3 11:43:24 2023 UTC (16 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.1188: +8 -1 lines
Diff to previous 1.1188 (colored)

Query the client terminal for foreground and background colours and if
OSC 10 or 11 is received but no colour has been set inside tmux, return
the colour from the first attached client (probably most people will
have all light or or all dark terminals).

Revision 1.1188 / (download) - annotate - [select for diffs], Mon Dec 26 19:16:03 2022 UTC (16 months, 3 weeks ago) by jmc
Branch: MAIN
Changes since 1.1187: +2 -2 lines
Diff to previous 1.1187 (colored)

spelling fixes; from paul tagliamonte
amendments to his diff are noted on tech

Revision 1.1187 / (download) - annotate - [select for diffs], Fri Dec 16 08:13:40 2022 UTC (17 months ago) by nicm
Branch: MAIN
Changes since 1.1186: +2 -2 lines
Diff to previous 1.1186 (colored)

Add send-keys -K to handle keys directly as if typed (so look up in key
table). GitHub issue 3361.

Revision 1.1186 / (download) - annotate - [select for diffs], Wed Dec 7 09:44:44 2022 UTC (17 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.1185: +2 -1 lines
Diff to previous 1.1185 (colored)

Process escape sequences in show-buffer, GitHub issue 3401.

Revision 1.1185 / (download) - annotate - [select for diffs], Fri Nov 11 08:37:55 2022 UTC (18 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.1184: +5 -2 lines
Diff to previous 1.1184 (colored)

Parse primary device attributes as well as secondary and add a SIXEL
flag (not used yet), from Anindya Mukherjee.

Revision 1.1184 / (download) - annotate - [select for diffs], Tue Nov 1 09:54:13 2022 UTC (18 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.1183: +2 -1 lines
Diff to previous 1.1183 (colored)

Add modified Tab key sequences, from Aaron Jensen, GitHub issue 3368.

Revision 1.1183 / (download) - annotate - [select for diffs], Fri Oct 28 13:00:02 2022 UTC (18 months, 3 weeks ago) by nicm
Branch: MAIN
Changes since 1.1182: +3 -2 lines
Diff to previous 1.1182 (colored)

Add paste-buffer-deleted notification and fix name of paste-buffer-changed.

Revision 1.1182 / (download) - annotate - [select for diffs], Wed Sep 28 07:55:29 2022 UTC (19 months, 3 weeks ago) by nicm
Branch: MAIN
Changes since 1.1181: +11 -2 lines
Diff to previous 1.1181 (colored)

Add a -T flag to capture-pane to stop at the last used cell instead of
the full width. Restore the previous behaviour by making it default to
off unless -J is used (the only time it matters). Fixes mosh unit tests;
GitHub issue 3339.

Revision 1.1181 / (download) - annotate - [select for diffs], Mon Aug 15 09:10:34 2022 UTC (21 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.1180: +3 -1 lines
Diff to previous 1.1180 (colored)

Notify when a paste buffer is deleted, GitHub issue 3302 from George
Nachman.

Revision 1.1180 / (download) - annotate - [select for diffs], Mon Aug 15 08:54:03 2022 UTC (21 months ago) by nicm
Branch: MAIN
Changes since 1.1179: +2 -1 lines
Diff to previous 1.1179 (colored)

Add a Nobr terminfo capability to tell tmux the terminal does not use
bright colours for bold (makes a difference to how tmux applies palette
differences). From Damien Tardy-Panis in GitHub issue 3301.

Revision 1.1179 / (download) - annotate - [select for diffs], Tue Aug 2 11:09:26 2022 UTC (21 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.1178: +28 -20 lines
Diff to previous 1.1178 (colored)

Add a third state "all" to allow-passthrough to work even in invisible
panes, from Sergei Grechanik in GitHub issue 3274.

Revision 1.1178 / (download) - annotate - [select for diffs], Wed Jul 6 08:31:59 2022 UTC (22 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.1177: +2 -1 lines
Diff to previous 1.1177 (colored)

Defer reading from control client until the command line command has
completed.

Revision 1.1177 / (download) - annotate - [select for diffs], Wed Jul 6 07:36:36 2022 UTC (22 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.1176: +5 -3 lines
Diff to previous 1.1176 (colored)

Support hyperlinks with capture-pane -e and add a mouse_hyperlink
format, GitHub issue 3247 from Jeff Chiang.

Revision 1.1176 / (download) - annotate - [select for diffs], Thu Jun 30 09:55:53 2022 UTC (22 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.1175: +22 -3 lines
Diff to previous 1.1175 (colored)

Add support for OSC 8 hyperlinks (a VTE extension now supported by other
terminals such as iTerm2). Originally written by me then extended and
completed by first Will Noble and later Jeff Chiang. GitHub issues 911,
2621, 2890, 3240.

Revision 1.1175 / (download) - annotate - [select for diffs], Tue Jun 21 09:30:01 2022 UTC (22 months, 4 weeks ago) by nicm
Branch: MAIN
Changes since 1.1174: +4 -1 lines
Diff to previous 1.1174 (colored)

Store time lines are scrolled into history and display in copy mode.

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

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

Revision 1.1173 / (download) - annotate - [select for diffs], Thu Jun 9 09:12:55 2022 UTC (23 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.1172: +5 -3 lines
Diff to previous 1.1172 (colored)

If an application gives the first parameter to OSC 52, validate and pass
on to outside terminal. GitHub issue 3192.

Revision 1.1172 / (download) - annotate - [select for diffs], Tue Jun 7 10:02:19 2022 UTC (23 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.1171: +7 -1 lines
Diff to previous 1.1171 (colored)

Expand arguments to some commands where it makes sense, GitHub issue
3204 from Anindya Mukherjee.

Revision 1.1171 / (download) - annotate - [select for diffs], Sat Jun 4 07:42:07 2022 UTC (23 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.1170: +2 -1 lines
Diff to previous 1.1170 (colored)

When picking a buffer because one isn't specified by the user, ignore
named buffers. GitHub issue 3212 from David le Blanc.

Revision 1.1170 / (download) - annotate - [select for diffs], Mon May 30 13:02:55 2022 UTC (23 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.1169: +7 -1 lines
Diff to previous 1.1169 (colored)

If a mouse position was above the maximum supported by the normal mouse
protocol (223), tmux was allowing it to wrap around. However, since tmux
was not correctly handling this on input, other programs also do not
handle it correctly, and the alternative SGR mouse mode is now
widespread, this seems unnecessary, so remove this feature. Also define
some constants to make it clearer what the numbers mean. Mostly from
Leonid S Usov in GitHub issue 3165.

Revision 1.1169 / (download) - annotate - [select for diffs], Mon May 30 13:00:18 2022 UTC (23 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.1168: +4 -3 lines
Diff to previous 1.1168 (colored)

Add a way for lines added to copy mode to be passed through the parser
to handle escape sequences and use it for run-shell, GitHub issue 3156.

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

Better error reporting when applying custom layouts.

Revision 1.1167 / (download) - annotate - [select for diffs], Mon May 30 12:48:57 2022 UTC (23 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.1166: +13 -1 lines
Diff to previous 1.1166 (colored)

Add an ACL list for users connecting to the tmux socket. Users may be
forbidden from attaching, forced to attach read-only, or allowed to
attach read-write. A new command, server-access, configures the list.
tmux gets the user using getpeereid(3) of the client socket. Users must
still configure file system permissions manually. From Dallas Lyons and
others.

Revision 1.1166 / (download) - annotate - [select for diffs], Thu Mar 24 09:05:57 2022 UTC (2 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.1165: +4 -1 lines
Diff to previous 1.1165 (colored)

Add a capability for OSC 7 and use it similarly to how the title is set
(and controlled by the same set-titles option). GitHub issue 3127.

Revision 1.1165 / (download) - annotate - [select for diffs], Wed Mar 16 17:00:17 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.1164: +37 -35 lines
Diff to previous 1.1164 (colored)

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

Revision 1.1164 / (download) - annotate - [select for diffs], Tue Mar 8 18:31:47 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.1163: +2 -1 lines
Diff to previous 1.1163 (colored)

Add remain-on-exit-format to set text shown when pane is dead.

Revision 1.1163 / (download) - annotate - [select for diffs], Tue Mar 8 12:01:19 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.1162: +9 -3 lines
Diff to previous 1.1162 (colored)

Add argument to refresh-client -l to forward clipboard to a pane. GitHub
issue 3068.

Revision 1.1162 / (download) - annotate - [select for diffs], Tue Mar 8 11:28:40 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.1161: +82 -78 lines
Diff to previous 1.1161 (colored)

Add formats for client and server UID and user (for multiuser setups).

Revision 1.1161 / (download) - annotate - [select for diffs], Tue Feb 22 11:10:41 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.1160: +2 -1 lines
Diff to previous 1.1160 (colored)

Add next_session_id format with the next session ID, GitHub issue 3078.

Revision 1.1160 / (download) - annotate - [select for diffs], Wed Feb 16 18:55:05 2022 UTC (2 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.1159: +61 -7 lines
Diff to previous 1.1159 (colored)

Support more mouse buttons when the terminal sends them, GitHub issue
3055.

Revision 1.1159 / (download) - annotate - [select for diffs], Tue Feb 15 13:03:02 2022 UTC (2 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.1158: +4 -2 lines
Diff to previous 1.1158 (colored)

Do not create a buffer from an OSC 52 response if we have not sent a
query.

Revision 1.1158 / (download) - annotate - [select for diffs], Tue Feb 1 14:46:42 2022 UTC (2 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.1157: +7 -1 lines
Diff to previous 1.1157 (colored)

Add option to show arrows for active pane indicator, GitHub issue 3022
from Marcel Partap.

Revision 1.1157 / (download) - annotate - [select for diffs], Tue Dec 21 13:07:53 2021 UTC (2 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.1156: +4 -4 lines
Diff to previous 1.1156 (colored)

ARM's Morello CHERI architecture does not support pointers in packed
structures, so remove the packed attribute on struct grid_line and
reorder the members to eliminate unnecessary padding. From Jessica
Clarke in GitHub issue 3012.

Revision 1.1156 / (download) - annotate - [select for diffs], Fri Dec 10 12:42:37 2021 UTC (2 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.1155: +2 -2 lines
Diff to previous 1.1155 (colored)

Add a NOBLOCK flag rather than adding amount to wait for when
dealing with potentially-long sequences. GitHub issue 3001.

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

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

Revision 1.1154 / (download) - annotate - [select for diffs], Wed Nov 3 13:37:17 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.1153: +5 -2 lines
Diff to previous 1.1153 (colored)

Add a cursor-style option, from Alexis Hildebrandt in GitHub issue 2960.

Revision 1.1153 / (download) - annotate - [select for diffs], Mon Nov 1 09:34:49 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.1152: +5 -4 lines
Diff to previous 1.1152 (colored)

Add a cursor-colour option, from Alexis Hildebrandt in GitHub issue
2959.

Revision 1.1152 / (download) - annotate - [select for diffs], Thu Oct 28 18:54:33 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.1151: +4 -1 lines
Diff to previous 1.1151 (colored)

Allow detach even if suspend flag set, GitHub issue 2932.

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

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

Revision 1.1150 / (download) - annotate - [select for diffs], Mon Oct 25 21:21:16 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.1149: +2 -1 lines
Diff to previous 1.1149 (colored)

Add a way to force a colour to RGB and a format to display it.

Revision 1.1149 / (download) - annotate - [select for diffs], Mon Oct 25 09:38:36 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.1148: +3 -2 lines
Diff to previous 1.1148 (colored)

Add -s and -S to display-popup to set popup and border style, from
Alexis Hildebrandt in GitHub issue 2931.

Revision 1.1148 / (download) - annotate - [select for diffs], Wed Oct 20 09:50:40 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.1147: +4 -4 lines
Diff to previous 1.1147 (colored)

Add -T to set a popup title, from Alexis Hildebrandt in GitHub issue 2941.

Revision 1.1147 / (download) - annotate - [select for diffs], Thu Oct 14 13:19:01 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.1146: +51 -15 lines
Diff to previous 1.1146 (colored)

Add popup-border-lines option to set popup line style, from Alexis
Hildebrandt, GitHub issue 2930.

Revision 1.1146 / (download) - annotate - [select for diffs], Wed Oct 13 09:28:36 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.1145: +3 -2 lines
Diff to previous 1.1145 (colored)

Add popup-style and popup-border-style options, from Alexis Hildebrandt
in GitHub issue 2927.

Revision 1.1145 / (download) - annotate - [select for diffs], Mon Oct 11 13:27:50 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.1144: +14 -3 lines
Diff to previous 1.1144 (colored)

Make positions hidden by overlays range-based rather than character-based,
from Anindya Mukherjee.

Revision 1.1144 / (download) - annotate - [select for diffs], Mon Oct 11 10:55:30 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.1143: +7 -6 lines
Diff to previous 1.1143 (colored)

Add -e flag to set environment for popup, from Alexis Hildebrandt in
GitHub issue 2924.

Revision 1.1143 / (download) - annotate - [select for diffs], Tue Oct 5 12:46:02 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.1142: +4 -2 lines
Diff to previous 1.1142 (colored)

Separate "very visible" flag from blinking flag, it should not affect
DECSCUSR. GitHub issue 2891.

Revision 1.1142 / (download) - annotate - [select for diffs], Fri Sep 10 15:03:18 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.1141: +1 -15 lines
Diff to previous 1.1141 (colored)

Do fatal/fatalx a different way so the compiler trick to avoid warnings
becomes unnecessary, prompted by theo.

Revision 1.1141 / (download) - annotate - [select for diffs], Fri Sep 10 14:22:24 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.1140: +15 -1 lines
Diff to previous 1.1140 (colored)

Get rid of the last two warnings by turning them off around the problem
statements, if the compiler supports it.

Revision 1.1140 / (download) - annotate - [select for diffs], Thu Sep 9 13:38:32 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.1139: +2 -2 lines
Diff to previous 1.1139 (colored)

Expand argument to run-shell again.

Revision 1.1139 / (download) - annotate - [select for diffs], Fri Aug 27 17:25:55 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.1138: +9 -3 lines
Diff to previous 1.1138 (colored)

Replace %% in command lists (by copying them) for template arguments ,
this means they can be used with {} as well. Also make argument
processing from an existing vector preserve commands. GitHub issue 2858.

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

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

Revision 1.1137 / (download) - annotate - [select for diffs], Wed Aug 25 08:51:55 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.1136: +11 -3 lines
Diff to previous 1.1136 (colored)

Validate command argument types (string or command list) and give more
useful error messages.

Revision 1.1136 / (download) - annotate - [select for diffs], Wed Aug 25 07:09:30 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.1135: +8 -6 lines
Diff to previous 1.1135 (colored)

Fix up some printflike attributes.

Revision 1.1135 / (download) - annotate - [select for diffs], Mon Aug 23 12:33:55 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.1134: +10 -1 lines
Diff to previous 1.1134 (colored)

Move command argument parsing common functions and don't bother to parse
again if given a command rather than a string.

Revision 1.1134 / (download) - annotate - [select for diffs], Sat Aug 21 20:46:43 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.1133: +4 -2 lines
Diff to previous 1.1133 (colored)

Preserve argument type in command and convert to string on demand.

Revision 1.1133 / (download) - annotate - [select for diffs], Sat Aug 21 18:39:07 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.1132: +18 -4 lines
Diff to previous 1.1132 (colored)

Pass typed arguments out of the parser into the arguments list and let
it convert them into strings.

Revision 1.1132 / (download) - annotate - [select for diffs], Sat Aug 21 17:25:32 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.1131: +1 -2 lines
Diff to previous 1.1131 (colored)

Stop caring about empty commands, just treat as a null command.

Revision 1.1131 / (download) - annotate - [select for diffs], Sat Aug 21 14:06:17 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.1130: +2 -1 lines
Diff to previous 1.1130 (colored)

Preserve command group when moving temporary list to current list being
buit.

Revision 1.1130 / (download) - annotate - [select for diffs], Sat Aug 21 10:28:05 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.1129: +2 -2 lines
Diff to previous 1.1129 (colored)

Rename a member to match what it will be in future.

Revision 1.1129 / (download) - annotate - [select for diffs], Sat Aug 21 10:22:39 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.1128: +3 -1 lines
Diff to previous 1.1128 (colored)

Add args parsing callback for some future work, currently unused.

Revision 1.1128 / (download) - annotate - [select for diffs], Sat Aug 21 08:44:59 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.1127: +10 -7 lines
Diff to previous 1.1127 (colored)

Wrap command argument definitions in their own struct.

Revision 1.1127 / (download) - annotate - [select for diffs], Fri Aug 20 19:50:17 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.1126: +5 -7 lines
Diff to previous 1.1126 (colored)

Hide struct args behind a couple of accessor functions.

Revision 1.1126 / (download) - annotate - [select for diffs], Fri Aug 20 19:34:51 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.1125: +3 -3 lines
Diff to previous 1.1125 (colored)

Add a couple of const and fix some warnings.

Revision 1.1125 / (download) - annotate - [select for diffs], Fri Aug 20 18:59:53 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.1124: +10 -5 lines
Diff to previous 1.1124 (colored)

Expose args_value struct (will be needed soon) and add some missing frees.

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

Add a way to create an empty arguments set.

Revision 1.1123 / (download) - annotate - [select for diffs], Fri Aug 13 23:05:40 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.1122: +2 -1 lines
Diff to previous 1.1122 (colored)

Tweak how mouse works on popup: only Meta alone resizes or moves, not
Meta with other modifiers; button 2 on the left or top border opens
menu, right or bottom resizes; button 1 on any border moves.

Revision 1.1122 / (download) - annotate - [select for diffs], Fri Aug 13 19:55:11 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.1121: +2 -2 lines
Diff to previous 1.1121 (colored)

Fill in some other bits on new panes.

Revision 1.1121 / (download) - annotate - [select for diffs], Fri Aug 13 19:27:25 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.1120: +3 -1 lines
Diff to previous 1.1120 (colored)

Add menu options to convert a popup into a pane.

Revision 1.1120 / (download) - annotate - [select for diffs], Fri Aug 13 18:54:54 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.1119: +19 -7 lines
Diff to previous 1.1119 (colored)

Add a menu when a popup is present (mouse only for now).

Revision 1.1119 / (download) - annotate - [select for diffs], Fri Aug 13 17:03:29 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.1118: +2 -1 lines
Diff to previous 1.1118 (colored)

Add -B flag to remove border from popup.

Revision 1.1118 / (download) - annotate - [select for diffs], Fri Aug 13 07:37:58 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.1117: +7 -106 lines
Diff to previous 1.1117 (colored)

Break message type stuff out into its own header.

Revision 1.1117 / (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.1116: +5 -2 lines
Diff to previous 1.1116 (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.1116 / (download) - annotate - [select for diffs], Thu Aug 12 08:05:11 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.1115: +3 -1 lines
Diff to previous 1.1115 (colored)

Move hook format setup earlier and add a hook_client, GitHub issue 2809.

Revision 1.1115 / (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.1114: +29 -19 lines
Diff to previous 1.1114 (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.1114 / (download) - annotate - [select for diffs], Wed Aug 11 09:05:21 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.1113: +4 -1 lines
Diff to previous 1.1113 (colored)

Return to applying pane-border-style to the area outside panes, GitHub
issue 2816.

Revision 1.1113 / (download) - annotate - [select for diffs], Fri Aug 6 09:34:09 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.1112: +2 -1 lines
Diff to previous 1.1112 (colored)

Add basic support for zero width joiners, GitHub issues 1605 and 2784.

Revision 1.1112 / (download) - annotate - [select for diffs], Wed Jul 21 08:06:36 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.1111: +4 -2 lines
Diff to previous 1.1111 (colored)

Do not close popups on resize, instead adjust them to fit, from Anindya
Mukherjee.

Revision 1.1111 / (download) - annotate - [select for diffs], Wed Jul 14 08:56:00 2021 UTC (2 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.1110: +4 -1 lines
Diff to previous 1.1110 (colored)

Move default value for TERM into tmux.h.

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

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

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

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

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

Improve logging of screen mode changes.

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

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

Revision 1.1106 / (download) - annotate - [select for diffs], Thu Jun 10 07:36:47 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1105: +12 -4 lines
Diff to previous 1.1105 (colored)

Change cursor style handling so tmux understands which sequences contain
blinking and sets the flag appropriately, means that it works whether
cnorm disables blinking or not. GitHub issue 2682.

Revision 1.1105 / (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.1104: +19 -8 lines
Diff to previous 1.1104 (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.1104 / (download) - annotate - [select for diffs], Thu Jun 10 07:28:45 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1103: +2 -1 lines
Diff to previous 1.1103 (colored)

Three changes to fix problems with xterm in VT340 mode, reported by
Thomas Sattler.

1) Do not include the DECSLRM or DECFRA features for xterm; they will be
   added instead if secondary DA responds as VT420 (this happens
   already).

2) Set or reset the individual flags after terminal-overrides is
   applied, so the user can properly disable them.

3) Add a capability for DECFRA ("Rect").

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

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

Revision 1.1102 / (download) - annotate - [select for diffs], Mon Apr 12 06:50:25 2021 UTC (3 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.1101: +3 -2 lines
Diff to previous 1.1101 (colored)

Permit shortcut keys in buffer, client, tree modes to be configured with
a format; the default remains the line number. GitHub issue 2636.

Revision 1.1101 / (download) - annotate - [select for diffs], Mon Apr 5 08:43:48 2021 UTC (3 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.1100: +3 -2 lines
Diff to previous 1.1100 (colored)

Fix a couple of edge cases with the jump-back-xxx commands, and also
update back-to-indentation to use grid_reader, thereby fixing line
wrapping issues. From Anindya Mukherjee, GitHub issue 2633.

Revision 1.1100 / (download) - annotate - [select for diffs], Tue Mar 16 09:14:58 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.1099: +2 -1 lines
Diff to previous 1.1099 (colored)

Add client-detached notification in control mode, from Mohsin Kaleem.

Revision 1.1099 / (download) - annotate - [select for diffs], Thu Mar 11 07:08:18 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.1098: +2 -1 lines
Diff to previous 1.1098 (colored)

Tidy old jobs every hour instead of every 30 seconds.

Revision 1.1098 / (download) - annotate - [select for diffs], Thu Mar 11 06:41:04 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.1097: +3 -2 lines
Diff to previous 1.1097 (colored)

Add an "absolute-centre" alignment to use the centre of the total space
instead of only the available space. From Magnus Gross in GitHub issue 2578.

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

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

Revision 1.1096 / (download) - annotate - [select for diffs], Tue Mar 2 10:56:45 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.1095: +8 -13 lines
Diff to previous 1.1095 (colored)

Drop support for popups where the content is provided directly to tmux
(which does not have many practical uses) and only support running a
program in the popup. display-popup is now simpler and can accept
multiple arguments to avoid escaping problems (like the other commands).

Revision 1.1095 / (download) - annotate - [select for diffs], Mon Feb 22 08:18:13 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.1094: +4 -4 lines
Diff to previous 1.1094 (colored)

Move config file path expansion much earlier, keep the list of paths
around rather than freeing later, and add a config_files format variable
containing it. Suggested by kn@ a while back.

Revision 1.1094 / (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.1093: +2 -3 lines
Diff to previous 1.1093 (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.1093 / (download) - annotate - [select for diffs], Mon Feb 22 06:53:04 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.1092: +5 -1 lines
Diff to previous 1.1092 (colored)

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

Revision 1.1092 / (download) - annotate - [select for diffs], Wed Feb 17 07:18:36 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.1091: +9 -2 lines
Diff to previous 1.1091 (colored)

Move the call to setupterm() into the client and have it pass the
results to the server over imsg, means the server does not need to enter
ncurses or read terminfo db. Old clients will not work with a new
server.

Revision 1.1091 / (download) - annotate - [select for diffs], Mon Feb 15 09:39:38 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.1090: +2 -1 lines
Diff to previous 1.1090 (colored)

Support X11 colour names and some other variations for OSC 10/11, also
add OSC 110 and 111. GitHub issue 2567.

Revision 1.1090 / (download) - annotate - [select for diffs], Thu Feb 11 09:39:29 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.1089: +3 -1 lines
Diff to previous 1.1089 (colored)

Add a couple of helper functions, and flush imsgs on exit.

Revision 1.1089 / (download) - annotate - [select for diffs], Thu Feb 11 08:28:45 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.1088: +17 -2 lines
Diff to previous 1.1088 (colored)

Move file handling protocol stuff all into file.c so it can be reused
more easily.

Revision 1.1088 / (download) - annotate - [select for diffs], Fri Feb 5 12:29:19 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.1087: +2 -1 lines
Diff to previous 1.1087 (colored)

Send Unicode directional isolate characters around horizontal pane
borders if the terminal support UTF-8 and an extension terminfo(5)
capability "Bidi" is present. On terminals with BiDi support (ie, VTE)
this seems to be enough to display right-to-left text acceptably enough
to be usable (with some caveats about the mouse position). Requested by
and with help from Mahmoud Elagdar in GitHub issue 2425.

Revision 1.1087 / (download) - annotate - [select for diffs], Fri Jan 29 09:48:43 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.1086: +30 -37 lines
Diff to previous 1.1086 (colored)

Trim output overwritten by later text or clears completely rather than
only in a few cases. This means we can better track when a line should
wrap. GitHub issue 2537.

Revision 1.1086 / (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.1085: +2 -2 lines
Diff to previous 1.1085 (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.1085 / (download) - annotate - [select for diffs], Mon Jan 18 10:27:54 2021 UTC (3 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.1084: +1 -2 lines
Diff to previous 1.1084 (colored)

There is no need to clear every line entirely before drawing to it, this
means moving the cursor and messes up wrapping. Better to just clear the
sections that aren't written over. GitHub issue 2537.

Revision 1.1084 / (download) - annotate - [select for diffs], Sun Jan 17 16:17:41 2021 UTC (3 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.1083: +2 -2 lines
Diff to previous 1.1083 (colored)

Add -N flag to never start server even if command would normally do so,
GitHub issue 2523.

Revision 1.1083 / (download) - annotate - [select for diffs], Fri Jan 8 10:09:44 2021 UTC (3 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.1082: +2 -1 lines
Diff to previous 1.1082 (colored)

Missed from last commit.

Revision 1.1082 / (download) - annotate - [select for diffs], Tue Dec 22 09:22:14 2020 UTC (3 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.1081: +24 -1 lines
Diff to previous 1.1081 (colored)

Break cursor movement in grid into a common set of functions that can
handle line wrapping and so on in one place and use them for the obvious
copy mode commands. From Anindya Mukherjee.

Revision 1.1081 / (download) - annotate - [select for diffs], Thu Dec 3 07:12:12 2020 UTC (3 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.1080: +2 -1 lines
Diff to previous 1.1080 (colored)

Redraw any visible modes when status line changes so that formats like
the pane title are updated. GitHub issue 2487. Also a man page fix from
jmc.

Revision 1.1080 / (download) - annotate - [select for diffs], Fri Oct 30 08:55:56 2020 UTC (3 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.1079: +2 -1 lines
Diff to previous 1.1079 (colored)

Add a -O flag to display-menu to change the mouse behaviour and not
close the menu when the mouse is released, from teo_paul1 at yahoo dot
com.

Revision 1.1079 / (download) - annotate - [select for diffs], Mon Oct 5 09:53:01 2020 UTC (3 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.1078: +3 -1 lines
Diff to previous 1.1078 (colored)

Use the setal capability as well as (tmux's) Setulc.

Revision 1.1078 / (download) - annotate - [select for diffs], Tue Sep 22 05:23:34 2020 UTC (3 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.1077: +3 -2 lines
Diff to previous 1.1077 (colored)

Fix warnings on some platforms with %llx and add a new message to handle
64-bit client flags.

Revision 1.1077 / (download) - annotate - [select for diffs], Wed Sep 2 13:46:35 2020 UTC (3 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.1076: +2 -1 lines
Diff to previous 1.1076 (colored)

Add a -w flag to set- and load-buffer to send to clipboard using OSC 52.
GitHub issue 2363.

Revision 1.1076 / (download) - annotate - [select for diffs], Tue Aug 25 11:35:32 2020 UTC (3 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.1075: +9 -2 lines
Diff to previous 1.1075 (colored)

Allow colour to be spelt as color, from Boris Verkhovsky. GitHub issue
2317.

Revision 1.1075 / (download) - annotate - [select for diffs], Mon Jul 27 08:03:10 2020 UTC (3 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.1074: +2 -3 lines
Diff to previous 1.1074 (colored)

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

Revision 1.1074 / (download) - annotate - [select for diffs], Tue Jul 21 05:24:33 2020 UTC (3 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.1073: +2 -1 lines
Diff to previous 1.1073 (colored)

Fix show-buffer when run from inside tmux, GitHub issue 2314.

Revision 1.1073 / (download) - annotate - [select for diffs], Mon Jul 6 09:14:20 2020 UTC (3 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.1072: +13 -1 lines
Diff to previous 1.1072 (colored)

Add a way for control mode clients to subscribe to a format and be
notified of changes rather than having to poll. GitHub issue 2242.

Revision 1.1072 / (download) - annotate - [select for diffs], Sat Jul 4 14:24:02 2020 UTC (3 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.1071: +4 -2 lines
Diff to previous 1.1071 (colored)

kill-window -a cannot just walk the list of windows because if
renumber-windows is on, the window it wants to keep could be moved.
Change to renumber afterwards and also behave better if the window is
linked into the session twice. GitHub issue 2287.

Revision 1.1071 / (download) - annotate - [select for diffs], Thu Jun 18 08:34:22 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1070: +3 -1 lines
Diff to previous 1.1070 (colored)

Add a flag to make a client wait for an empty line before exiting in
control mode to avoid stray commands ending up in the shell.

Revision 1.1070 / (download) - annotate - [select for diffs], Tue Jun 16 08:18:34 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1069: +6 -2 lines
Diff to previous 1.1069 (colored)

d and D keys to reset to default in customize mode.

Revision 1.1069 / (download) - annotate - [select for diffs], Sat Jun 13 09:05:53 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1068: +2 -2 lines
Diff to previous 1.1068 (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.1068 / (download) - annotate - [select for diffs], Thu Jun 11 19:43:34 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1067: +2 -1 lines
Diff to previous 1.1067 (colored)

Add some formats for search in copy mode (search_present, search_match).
GitHub issue 2268.

Revision 1.1067 / (download) - annotate - [select for diffs], Thu Jun 11 09:55:47 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1066: +2 -1 lines
Diff to previous 1.1066 (colored)

Add a -A option to pause a pane manually.

Revision 1.1066 / (download) - annotate - [select for diffs], Wed Jun 10 07:27:10 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1065: +2 -1 lines
Diff to previous 1.1065 (colored)

Instead of a buffer size limit on each pane, set a limit of 300 seconds
of data for each client in control mode.

Revision 1.1065 / (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.1064: +3 -5 lines
Diff to previous 1.1064 (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.1064 / (download) - annotate - [select for diffs], Fri Jun 5 09:32:15 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1063: +3 -3 lines
Diff to previous 1.1063 (colored)

Fix various confusion about am vs xenl.

Revision 1.1063 / (download) - annotate - [select for diffs], Fri Jun 5 07:33:57 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1062: +8 -3 lines
Diff to previous 1.1062 (colored)

Add support for pausing a pane when the output buffered for a control
mode client gets too far behind. The pause-after flag with a time is set
on the pane with refresh-client -f and a paused pane may be resumed with
refresh-client -A. GitHub issue 2217.

Revision 1.1062 / (download) - annotate - [select for diffs], Tue Jun 2 20:51:46 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1061: +3 -1 lines
Diff to previous 1.1061 (colored)

Move the code to set up a padding cell into grid.c.

Revision 1.1061 / (download) - annotate - [select for diffs], Tue Jun 2 20:10:23 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1060: +2 -2 lines
Diff to previous 1.1060 (colored)

Allow UTF-8 characters of width 0 to be stored, it is useful to be able
to put padding cells in as width 0.

Revision 1.1060 / (download) - annotate - [select for diffs], Tue Jun 2 08:17:27 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1059: +2 -1 lines
Diff to previous 1.1059 (colored)

Use CLOCK_MONOTONIC for timer measurement and add a timestamp to control
mode %output blocks.

Revision 1.1059 / (download) - annotate - [select for diffs], Mon Jun 1 19:39:25 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1058: +3 -1 lines
Diff to previous 1.1058 (colored)

Change format callback to return value rather than storing it in the entry.

Revision 1.1058 / (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.1057: +16 -11 lines
Diff to previous 1.1057 (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.1057 / (download) - annotate - [select for diffs], Tue May 26 08:41:47 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1056: +4 -1 lines
Diff to previous 1.1056 (colored)

Pass the stdout file descriptor from the client as well as stdin and use
them for control clients directly instead of passing everything via the
client.

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

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

Revision 1.1055 / (download) - annotate - [select for diffs], Mon May 25 18:19:29 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1054: +10 -7 lines
Diff to previous 1.1054 (colored)

Tidy up new UTF-8 code and make it more generic.

Revision 1.1054 / (download) - annotate - [select for diffs], Mon May 25 15:02:25 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1053: +5 -5 lines
Diff to previous 1.1053 (colored)

Make some data types consistent.

Revision 1.1053 / (download) - annotate - [select for diffs], Mon May 25 09:32:10 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1052: +24 -9 lines
Diff to previous 1.1052 (colored)

Instead of storing all UTF-8 characters in the extended cell which means
that 14 bytes are wasted for each character in the BMP, only store
characters of three bytes or less in the cell itself and store others
(outside the BMP or with combining characters) in a separate global
tree. Can reduce grid memory use for heavy Unicode users by around 30%.

Revision 1.1052 / (download) - annotate - [select for diffs], Sun May 24 09:40:17 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1051: +4 -3 lines
Diff to previous 1.1051 (colored)

Give control code its own state struct.

Revision 1.1051 / (download) - annotate - [select for diffs], Sun May 24 09:13:06 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1050: +2 -3 lines
Diff to previous 1.1050 (colored)

Now the tty has a pointer back to the client there is no point (and a
bit confusing) in it keeping a copy of the fd as well. Remove it.

Revision 1.1050 / (download) - annotate - [select for diffs], Fri May 22 11:07:05 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1049: +8 -19 lines
Diff to previous 1.1049 (colored)

Move client offset stuff into control.c since only control clients will
need it.

Revision 1.1049 / (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.1048: +35 -3 lines
Diff to previous 1.1048 (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.1048 / (download) - annotate - [select for diffs], Sat May 16 16:50:55 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1047: +7 -1 lines
Diff to previous 1.1047 (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.1047 / (download) - annotate - [select for diffs], Sat May 16 16:44:54 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1046: +7 -4 lines
Diff to previous 1.1046 (colored)

Add a terminal feature for enable/disable extended keys (supported by
xterm and mintty) and add an option to make tmux send it. Only forward
extended keys if the application has requested them, even though we use
the CSI u sequence and xterm uses CSI 27 ~ - this is what mintty does as
well.

Revision 1.1046 / (download) - annotate - [select for diffs], Sat May 16 16:35:13 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1045: +21 -17 lines
Diff to previous 1.1045 (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.1045 / (download) - annotate - [select for diffs], Sat May 16 16:33:16 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1044: +2 -2 lines
Diff to previous 1.1044 (colored)

Rename KEYC_ESCAPE to KEYC_META.

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

xterm-keys has been on by default for five years and all other modern
terminals use these key sequences by default. Merge the code into the
main tty and input tree processing (converting the latter to use a tree
rather than a table at the same time) and make the option a no-op.

Revision 1.1043 / (download) - annotate - [select for diffs], Sat May 16 16:26:34 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1042: +12 -1 lines
Diff to previous 1.1042 (colored)

Add an option to set the pane border lines style from a choice of single
lines (ACS or UTF-8), double or heavy (UTF-8), simple (plain ASCII) or
number (the pane numbers). Lines that won't work on a non-UTF-8 terminal
are translated back into ACS when they are output.

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

Add screen write flags instead of individual bits and fix line length
calculation with padding.

Revision 1.1041 / (download) - annotate - [select for diffs], Sat May 16 16:20:59 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1040: +17 -2 lines
Diff to previous 1.1040 (colored)

Add a client flag 'active-pane' which stores the active pane in the
client and allows it to be changed independently from the real active
pane stored in the window. This is can be used with session groups which
allow an independent current window (although it would be nice to have a
flag for this too and remove session groups). The client active pane is
only really useful interactively, many things (hooks, window-style,
zooming) still use the window active pane.

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

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

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

Move editor stuff to common code in popup.c.

Revision 1.1038 / (download) - annotate - [select for diffs], Sat May 16 16:07:55 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1037: +2 -1 lines
Diff to previous 1.1037 (colored)

Add a -D flag to ask tmux not to daemonize, useful both for running a
debugger (lldb does not have follow-fork-mode) and for running with a
managed supervisor init system. GitHub issue 2190.

Revision 1.1037 / (download) - annotate - [select for diffs], Sat May 16 16:02:24 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1036: +29 -6 lines
Diff to previous 1.1036 (colored)

Add a customize mode where keys and options may be browsed and changed,
includes adding a brief description of each option. Bound to "C" by
default.

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

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

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

Store and restore cursor position when copy mode is resized, from
Anindya Mukherjee.

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

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

Revision 1.1033 / (download) - annotate - [select for diffs], Sat May 16 15:45:29 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1032: +5 -3 lines
Diff to previous 1.1032 (colored)

Change the existing client flags for control mode to apply for any
client, use the same mechanism for the read-only flag and add an
ignore-size flag.

refresh-client -F has become -f (-F stays for backwards compatibility)
and attach-session and switch-client now have -f flags also. A new
format "client_flags" lists the flags and is shown by list-clients by
default.

This separates the read-only flag from "ignore size" behaviour (new
ignore-size) flag - both behaviours are useful in different
circumstances.

attach -r and switchc -r remain and set or toggle both flags together.

Revision 1.1032 / (download) - annotate - [select for diffs], Sat May 16 15:40:04 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1031: +3 -1 lines
Diff to previous 1.1031 (colored)

Add formats for after hook command arguments.

Revision 1.1031 / (download) - annotate - [select for diffs], Sat May 16 15:34:08 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1030: +39 -18 lines
Diff to previous 1.1030 (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.1030 / (download) - annotate - [select for diffs], Sat May 16 15:27:08 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1029: +9 -7 lines
Diff to previous 1.1029 (colored)

Rename and tidy some stuff in struct tty_ctx.

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

Add 'e' key in buffer mode to open the buffer in an editor.

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

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

Revision 1.1027 / (download) - annotate - [select for diffs], Sat May 16 15:11:52 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1026: +1 -3 lines
Diff to previous 1.1026 (colored)

Copy mode search improvements:

- Add styles for the search marking styles (copy-mode-match-style and
  copy-mode-current-match-style).

- Show the current match (the one with the cursor on it) in a different style.

- Copying without a selection will copy the current match if there is one.

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

Improve command prompt completion:

- Show a menu with completions if there are multiple.

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

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

Revision 1.1025 / (download) - annotate - [select for diffs], Sat May 16 15:01:31 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1024: +20 -13 lines
Diff to previous 1.1024 (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.1024 / (download) - annotate - [select for diffs], Sat May 16 14:53:23 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1023: +12 -5 lines
Diff to previous 1.1023 (colored)

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

Revision 1.1023 / (download) - annotate - [select for diffs], Sat May 16 14:49:50 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1022: +2 -2 lines
Diff to previous 1.1022 (colored)

Instead of forbidding invalid session names, sanitize them like window
names.

Revision 1.1022 / (download) - annotate - [select for diffs], Sat May 16 14:46:14 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1021: +2 -1 lines
Diff to previous 1.1021 (colored)

Instead of having a default set of terminals in terminal-overrides that
get XT added and using that as a marker for xterm(1)-like, assume that
if the terminfo(5) entry already has XT or the clear capability starts
with CSI then the terminal is VT100-like and it should be safe to send
DA requests. The DA responses trigger additional features being added.

Revision 1.1021 / (download) - annotate - [select for diffs], Sat May 16 14:39:40 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1020: +3 -1 lines
Diff to previous 1.1020 (colored)

Add feature and capabilities for focus reporting. Also document AX and
XT even though they aren't tmux's, and add some bits for rxvt.

Revision 1.1020 / (download) - annotate - [select for diffs], Sat May 16 14:34:44 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1019: +3 -1 lines
Diff to previous 1.1019 (colored)

Add a feature for bracketed paste.

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

Move terminal features into a single file.

Revision 1.1018 / (download) - annotate - [select for diffs], Sat May 16 14:26:33 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1017: +7 -2 lines
Diff to previous 1.1017 (colored)

Build list of paths and weed out duplicates before loading configs, and
add TMUX_SOCK like TMUX_PATH for the socket directory.

Revision 1.1017 / (download) - annotate - [select for diffs], Sat May 16 14:22:51 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1016: +8 -4 lines
Diff to previous 1.1016 (colored)

Add extension terminfo(5) capabilities for margins.

Revision 1.1016 / (download) - annotate - [select for diffs], Sat May 16 14:16:25 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1015: +2 -2 lines
Diff to previous 1.1015 (colored)

Remove support for iTerm2's DSR 1337 extension and use the CSI > q
extension now supported by a few different terminals.

Revision 1.1015 / (download) - annotate - [select for diffs], Wed Apr 22 21:01:28 2020 UTC (4 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.1014: +3 -2 lines
Diff to previous 1.1014 (colored)

Indicate the marked pane in choose mode in reverse and add key to set
and clear it (m and M) and a key to jump to the starting pane (H).

Revision 1.1014 / (download) - annotate - [select for diffs], Wed Apr 22 06:57:13 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1013: +3 -1 lines
Diff to previous 1.1013 (colored)

Change so main-pane-width and height can be given as a percentage.

Revision 1.1013 / (download) - annotate - [select for diffs], Mon Apr 20 15:37:32 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1012: +3 -2 lines
Diff to previous 1.1012 (colored)

Apply terminal-overrides after terminal detection, it always takes
precedence.

Revision 1.1012 / (download) - annotate - [select for diffs], Mon Apr 20 14:59:31 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1011: +1 -2 lines
Diff to previous 1.1011 (colored)

Change how sync works to always send the end sequence after all output
is done when we are returning to the event loop (since we always move
the cursor at that point). Also a man fix from jmc.

Revision 1.1011 / (download) - annotate - [select for diffs], Mon Apr 20 13:25:36 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.1010: +18 -14 lines
Diff to previous 1.1010 (colored)

Tidy up the terminal detection and feature code and add named sets of
terminal features, each of which are defined in one place and map to a
builtin set of terminfo(5) capabilities. Features can be specified based
on TERM with a new terminal-features option or with the -T flag when
running tmux. tmux will also detect a few common terminals from the DA
and DSR responses.

This is intended to make it easier to configure tmux's use of
terminfo(5) even in the presence of outdated ncurses(3) or terminfo(5)
databases or for features which do not yet have a terminfo(5) entry.
Instead of having to grok terminfo(5) capability names and what they
should be set to in the terminal-overrides option, the user can
hopefully just give tmux a feature name and let it do the right thing.

The terminal-overrides option remains both for backwards compatibility
and to allow tweaks of individual capabilities.

tmux already did much of this already, this makes it tidier and simpler
to configure.

Revision 1.1010 / (download) - annotate - [select for diffs], Sat Apr 18 21:35:32 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.1009: +3 -1 lines
Diff to previous 1.1009 (colored)

The PANE_REDRAW flag bit might be needed by other panes so we can't
clear it on the first redraw, and it can't be set when we are finished
or they would be redrawn again, so if the redraw is deferred for a
client, copy the redraw flag into a separate set of bits just for that
client.

Revision 1.1009 / (download) - annotate - [select for diffs], Sat Apr 18 17:20:25 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.1008: +1 -2 lines
Diff to previous 1.1008 (colored)

A resize can realloc so cannot cache the value of the list pointer.

Revision 1.1008 / (download) - annotate - [select for diffs], Sat Apr 18 15:12:28 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.1007: +5 -1 lines
Diff to previous 1.1007 (colored)

There is no point in keeping a bunch of different text buffers for each
line when writing, we only need one as big as the line width - there
can't be any more text than that since newer will overwrite older.

Revision 1.1007 / (download) - annotate - [select for diffs], Sat Apr 18 14:21:39 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.1006: +3 -3 lines
Diff to previous 1.1006 (colored)

Use size_t not u_int for the bytes counters and fix a const missing.

Revision 1.1006 / (download) - annotate - [select for diffs], Sat Apr 18 07:32:54 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.1005: +4 -2 lines
Diff to previous 1.1005 (colored)

Bring back previons fix to only redraw panes that need it after a redraw
is deferred, but clear the pane flags when they are actually redrawn
rather than every time.

Revision 1.1005 / (download) - annotate - [select for diffs], Sat Apr 18 07:19:29 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.1004: +4 -1 lines
Diff to previous 1.1004 (colored)

Add formats for pane written/skipped bytes for debugging.

Revision 1.1004 / (download) - annotate - [select for diffs], Sat Apr 18 06:20:50 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.1003: +2 -1 lines
Diff to previous 1.1003 (colored)

Add a flag to protect against nested syncs and add some extra logging to
redrawing.

Revision 1.1003 / (download) - annotate - [select for diffs], Sat Apr 18 06:15:07 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.1002: +2 -5 lines
Diff to previous 1.1002 (colored)

Revert previous, there is still a problem.

Revision 1.1002 / (download) - annotate - [select for diffs], Sat Apr 18 06:10:15 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.1001: +5 -2 lines
Diff to previous 1.1001 (colored)

When a redraw is deferred because the terminal hasn't finished reading
the data from the last one, other panes could update while waiting, so
we set the flag to redraw them all when the new redraw actually
happened. But this means a lot of redrawing panes unnecessarily if they
haven't changed - so instead set a flag to say "at least one pane needs
to be redrawed" then look at the invidual pane flags to see which ones
need it.

Revision 1.1001 / (download) - annotate - [select for diffs], Fri Apr 17 14:06:42 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.1000: +2 -2 lines
Diff to previous 1.1000 (colored)

Make sure the cursor position is still on screen after we have trimmed
empty lines. Also improve some log messages.

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

Only start and stop sync for operations like clear and scroll where
there is a better chance more data will be on the way.

Revision 1.999 / (download) - annotate - [select for diffs], Thu Apr 16 15:14:25 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.998: +2 -1 lines
Diff to previous 1.998 (colored)

Send secondary device attributes instead of primary which gives us a bit
more useful information on some terminals.

Revision 1.998 / (download) - annotate - [select for diffs], Thu Apr 16 14:25:35 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.997: +3 -2 lines
Diff to previous 1.997 (colored)

Move the UTF-8 flag to terminal flags.

Revision 1.997 / (download) - annotate - [select for diffs], Thu Apr 16 14:03:51 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.996: +2 -1 lines
Diff to previous 1.996 (colored)

Add a helper function to get the terminal flags.

Revision 1.996 / (download) - annotate - [select for diffs], Thu Apr 16 13:35:24 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.995: +7 -1 lines
Diff to previous 1.995 (colored)

Add support for the iTerm2 sychronized updates escape sequence which
drastically reduces flickering.

Revision 1.995 / (download) - annotate - [select for diffs], Thu Apr 16 07:28:36 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.994: +2 -1 lines
Diff to previous 1.994 (colored)

Show signal name when process exits rather than number.

Revision 1.994 / (download) - annotate - [select for diffs], Wed Apr 15 17:50:02 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.993: +3 -1 lines
Diff to previous 1.993 (colored)

Instead of fixing with the cursor position when the copied screen is
created, resize it and let the resize/reflow code fix it up and return
it. Solves various problems with cursor position and resizing when in
copy mode. With Anindya Mukherjee.

Revision 1.993 / (download) - annotate - [select for diffs], Wed Apr 15 16:11:23 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.992: +3 -2 lines
Diff to previous 1.992 (colored)

Use mode-style for selected items, like choose modes. GitHub issue 2166.

Revision 1.992 / (download) - annotate - [select for diffs], Wed Apr 15 12:59:20 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.991: +2 -1 lines
Diff to previous 1.991 (colored)

Use grid_empty_line rather than memset when adding new lines on resize.
Also remove some old test code.

Revision 1.991 / (download) - annotate - [select for diffs], Tue Apr 14 06:00:52 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.990: +2 -1 lines
Diff to previous 1.990 (colored)

Provide an accessor for the running queue item and use it to not let
hooks recurse.

Revision 1.990 / (download) - annotate - [select for diffs], Mon Apr 13 20:51:57 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.989: +7 -4 lines
Diff to previous 1.989 (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.989 / (download) - annotate - [select for diffs], Mon Apr 13 18:59:41 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.988: +7 -1 lines
Diff to previous 1.988 (colored)

Add helpers for the simple case of parse string and add to command queue.

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

When parsing strings, put all commands in one group even if there are
newlines. This means that for example bind q { a \n b } and bind q "a ;
b" are the same. Also log commands in different groups separated by ;;
rather than ; (a command list like this should never be user visible).

Revision 1.987 / (download) - annotate - [select for diffs], Mon Apr 13 15:55:51 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.986: +14 -8 lines
Diff to previous 1.986 (colored)

When adding a list of commands to the queue, instead of automatically
creating a new state for each group of commands, require the caller to
create one and use it for all the commands in the list. This means the
current target works even with list with multiple groups (which can
happen if they are defined with newlines).

Revision 1.986 / (download) - annotate - [select for diffs], Mon Apr 13 14:46:04 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.985: +8 -15 lines
Diff to previous 1.985 (colored)

Move cmdq_state into cmd-queue.c.

Revision 1.985 / (download) - annotate - [select for diffs], Mon Apr 13 14:04:25 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.984: +7 -7 lines
Diff to previous 1.984 (colored)

Rename cmdq_shared to cmdq_state which will better reflect what it is
(going to be) used for.

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

Store a key event not a mouse event in the shared data.

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

Move the NOHOOKS flag into the shared flags.

Revision 1.982 / (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.981: +16 -37 lines
Diff to previous 1.981 (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.981 / (download) - annotate - [select for diffs], Mon Apr 13 08:26:27 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.980: +21 -30 lines
Diff to previous 1.980 (colored)

Make struct cmd local to cmd.c and move it out of tmux.h.

Revision 1.980 / (download) - annotate - [select for diffs], Fri Apr 10 20:53:54 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.979: +1 -2 lines
Diff to previous 1.979 (colored)

Remove unused define, also a man fix from jmc.

Revision 1.979 / (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.978: +4 -3 lines
Diff to previous 1.978 (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.978 / (download) - annotate - [select for diffs], Thu Apr 9 14:23:34 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.977: +1 -2 lines
Diff to previous 1.977 (colored)

Some minor style nits.

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

Wait until the initial command sequence is done before sending a device
attributes request and other bits that prompt a reply from the terminal.
This means that stray relies are not left on the terminal if the command
has attached and then immediately detached and tmux will not be around
to receive them. Prompted by a problem report from espie@.

Revision 1.976 / (download) - annotate - [select for diffs], Wed Apr 8 11:26:07 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.975: +2 -1 lines
Diff to previous 1.975 (colored)

Restore pane_current_path format from portable tmux, it is no longer
used by default and is very useful.

Revision 1.975 / (download) - annotate - [select for diffs], Tue Apr 7 13:55:24 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.974: +2 -1 lines
Diff to previous 1.974 (colored)

Do not restore history flag if it was never set.

Revision 1.974 / (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.973: +1 -4 lines
Diff to previous 1.973 (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.973 / (download) - annotate - [select for diffs], Wed Apr 1 09:05:27 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.972: +3 -1 lines
Diff to previous 1.972 (colored)

Support mouse in popups.

Revision 1.972 / (download) - annotate - [select for diffs], Tue Mar 31 17:14:41 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.971: +7 -4 lines
Diff to previous 1.971 (colored)

Add a way to mark environment variables as "hidden" so they can be used
by tmux but are not passed into the environment of new panes.

Revision 1.971 / (download) - annotate - [select for diffs], Tue Mar 31 16:53:23 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.970: +3 -1 lines
Diff to previous 1.970 (colored)

Add non-regex search variants to avoid the performance cost for people
with large histories or long lines.

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

Add a "second click" key type which is fired for the second click of a
double click, even if the timer hasn't expired to confirm it isn't
actually a triple click. Provides a way for people who don't care about
triple clicks or can make their commands have no side effects to avoid
the double click timer delay.

Revision 1.969 / (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.968: +9 -8 lines
Diff to previous 1.968 (colored)

Move alternate screen into the screen rather than the pane.

Revision 1.968 / (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.967: +3 -2 lines
Diff to previous 1.967 (colored)

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

Revision 1.967 / (download) - annotate - [select for diffs], Mon Mar 30 16:16:48 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.966: +14 -14 lines
Diff to previous 1.966 (colored)

Tweak key numbers to avoid some special keys crossing over with modifier bits.

Revision 1.966 / (download) - annotate - [select for diffs], Sat Mar 28 09:51:12 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.965: +2 -1 lines
Diff to previous 1.965 (colored)

Make two -E only close popup automatically if the command exited with 0.

Revision 1.965 / (download) - annotate - [select for diffs], Sat Mar 28 09:39:44 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.964: +2 -1 lines
Diff to previous 1.964 (colored)

Fix how popup height is calculated to take embedded newlines into account.

Revision 1.964 / (download) - annotate - [select for diffs], Tue Mar 24 08:09:44 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.963: +19 -3 lines
Diff to previous 1.963 (colored)

Add support for overlay popup boxes to show text or output temporarily
above the normal layout. These work similarly to menus and are created
with the display-popup command.

Revision 1.963 / (download) - annotate - [select for diffs], Sat Mar 21 13:16:15 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.962: +3 -1 lines
Diff to previous 1.962 (colored)

Break code to convert an argument as a percentage into a common function.

Revision 1.962 / (download) - annotate - [select for diffs], Fri Mar 20 17:59:39 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.961: +3 -1 lines
Diff to previous 1.961 (colored)

Make the mouse_word and mouse_line formats work in copy mode and enable
the default pane menu in copy mode.

Revision 1.961 / (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.960: +12 -9 lines
Diff to previous 1.960 (colored)

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

Revision 1.960 / (download) - annotate - [select for diffs], Thu Mar 19 13:43:18 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.959: +5 -2 lines
Diff to previous 1.959 (colored)

Add a flag to run a background process in a pty as well, not used for
anything yet.

Revision 1.959 / (download) - annotate - [select for diffs], Tue Mar 17 11:10:12 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.958: +2 -2 lines
Diff to previous 1.958 (colored)

Ignore default-shell (and use /bin/sh) if it invalid not just if it is
tmux itself, also refuse to set the option to something invalid in the
first place. GitHub issue 2120.

Revision 1.958 / (download) - annotate - [select for diffs], Mon Mar 16 06:12:43 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.957: +3 -1 lines
Diff to previous 1.957 (colored)

Send mouse down event immediately rather than waiting for double click
to finish which would now mean it was out of order. Reported by Mark
Kelly.

Revision 1.957 / (download) - annotate - [select for diffs], Thu Mar 12 13:16:16 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.956: +3 -1 lines
Diff to previous 1.956 (colored)

Change how double and triple clicks works so that one or the other is
fired - a double click is no longer triggered on the way to a triple
click.

Revision 1.956 / (download) - annotate - [select for diffs], Thu Mar 12 09:26:34 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.955: +4 -2 lines
Diff to previous 1.955 (colored)

When the server socket is given by the user with -S, create it with
umask 177 instead of 117 because it may not be in a safe directory like
the default directory in /tmp. The user can chmod it more open after it
is created if they want.

Revision 1.955 / (download) - annotate - [select for diffs], Wed Mar 11 14:17:56 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.954: +2 -1 lines
Diff to previous 1.954 (colored)

Add some number operators for formats, from Tyler Culp.

Revision 1.954 / (download) - annotate - [select for diffs], Mon Feb 3 13:46:27 2020 UTC (4 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.953: +2 -2 lines
Diff to previous 1.953 (colored)

Instead of passing titles through vis() which doubles backslashes, just
ignore any containing control characters or invalid UTF-8. GitHub issue 2070.

Revision 1.953 / (download) - annotate - [select for diffs], Tue Jan 28 13:23:24 2020 UTC (4 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.952: +2 -3 lines
Diff to previous 1.952 (colored)

If ALL clients are readonly, allow them to affect the size, suggested by Thomas Sattler.

Revision 1.952 / (download) - annotate - [select for diffs], Tue Jan 28 11:39:51 2020 UTC (4 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.951: +2 -1 lines
Diff to previous 1.951 (colored)

If we can identify the terminal as iTerm2 or as tmux, we can be sure
they support 256 and RGB colours, so set those flags too.

Revision 1.951 / (download) - annotate - [select for diffs], Tue Jan 28 10:44:30 2020 UTC (4 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.950: +2 -1 lines
Diff to previous 1.950 (colored)

Reduce a difference with portable tmux by adding the -V flag and
#{version} format; on OpenBSD these just report the OpenBSD version.

Revision 1.950 / (download) - annotate - [select for diffs], Tue Jan 28 08:06:11 2020 UTC (4 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.949: +5 -1 lines
Diff to previous 1.949 (colored)

Add a define for flags meaning a client is not attached, and fix
unattached counter, reported by Thomas Sattler.

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

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

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

Suggested by Alex Tremblay in GitHub issue 2000.

Revision 1.948 / (download) - annotate - [select for diffs], Mon Jan 13 11:59:21 2020 UTC (4 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.947: +2 -1 lines
Diff to previous 1.947 (colored)

Stop handling DA and DSR after a second (they should be the first thing
sent) so this should be plenty.

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

Be more specific in the DSR we are looking for so it doesn't get
confused with mouse sequences. Also set a flag and don't bother checking
for it if we have already seen it (same for DA), and don't check if we
never asked for it.

Revision 1.946 / (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.945: +3 -3 lines
Diff to previous 1.945 (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.945 / (download) - annotate - [select for diffs], Sun Jan 12 21:07:07 2020 UTC (4 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.944: +5 -22 lines
Diff to previous 1.944 (colored)

The terminal type was never as much use as I expected so remove it in
favour of a couple of flags for the features used (DECSLRM and DECFRA).
Also rename the flag for no xenl to be more obvious while here.

Revision 1.944 / (download) - annotate - [select for diffs], Mon Dec 30 21:24:55 2019 UTC (4 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.943: +3 -2 lines
Diff to previous 1.943 (colored)

Do not let readonly clients limit the size, suggested by Max Barraclough
in GitHub issue 2042.

Revision 1.943 / (download) - annotate - [select for diffs], Thu Dec 26 11:04:58 2019 UTC (4 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.942: +2 -1 lines
Diff to previous 1.942 (colored)

Add a number of new formats to inspect what sessions and clients a
window is present or active in. From Tyler Culp in GitHub issue 2034.

Revision 1.942 / (download) - annotate - [select for diffs], Thu Dec 19 09:22:33 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.941: +3 -3 lines
Diff to previous 1.941 (colored)

When adding a list with multiple commands to the queue, the next item to
insert after needs to be the last one added, not the first. Reported by
Jason Kim in GitHub issue 2023.

Revision 1.941 / (download) - annotate - [select for diffs], Mon Dec 16 16:39:03 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.940: +1 -2 lines
Diff to previous 1.940 (colored)

If /dev/fd/X is a symlink and realpath() expands symlinks, /dev/fd/X
ends up pointing to the wrong place before it is passed to the client.
The path is only used internally so there is no real need for
realpath(), remove it and move the get_path function to file.c where all
the callers are.

Revision 1.940 / (download) - annotate - [select for diffs], Mon Dec 16 15:48:50 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.939: +4 -10 lines
Diff to previous 1.939 (colored)

Instead of using large buffers in imsgs, add the data or path onto the end.

Revision 1.939 / (download) - annotate - [select for diffs], Thu Dec 12 12:49:36 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.938: +5 -1 lines
Diff to previous 1.938 (colored)

Change source-file to use new file code which allows it to read from
stdin.

Revision 1.938 / (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.937: +87 -23 lines
Diff to previous 1.937 (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.937 / (download) - annotate - [select for diffs], Tue Dec 10 14:22:15 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.936: +3 -3 lines
Diff to previous 1.936 (colored)

Make TMUX_CONF a list of files and expand leading $FOO or ~.

Revision 1.936 / (download) - annotate - [select for diffs], Thu Nov 28 09:56:25 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.935: +3 -3 lines
Diff to previous 1.935 (colored)

Long lines and spacing fixes.

Revision 1.935 / (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.934: +11 -4 lines
Diff to previous 1.934 (colored)

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

Revision 1.934 / (download) - annotate - [select for diffs], Thu Nov 28 09:05:34 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.933: +4 -2 lines
Diff to previous 1.933 (colored)

Store xpixel/ypixel from TIOCGWINSZ and add formats.

Revision 1.933 / (download) - annotate - [select for diffs], Mon Nov 25 15:04:15 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.932: +2 -1 lines
Diff to previous 1.932 (colored)

Add p format modifier for padding to width.

Revision 1.932 / (download) - annotate - [select for diffs], Fri Nov 15 11:16:53 2019 UTC (4 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.931: +3 -1 lines
Diff to previous 1.931 (colored)

Handle OSC 7 (a VTE extension) and put the result in a new format (pane_path).

Revision 1.931 / (download) - annotate - [select for diffs], Thu Nov 14 15:37:19 2019 UTC (4 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.930: +10 -2 lines
Diff to previous 1.930 (colored)

Fix parsing of DA with only one argument in the response and add 65 for VT520.

Revision 1.930 / (download) - annotate - [select for diffs], Wed Oct 23 07:42:05 2019 UTC (4 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.929: +3 -1 lines
Diff to previous 1.929 (colored)

Use the existing code in format.c to add foramts for word and line at
cursor position in copy mode, from Anindya Mukherjee.

Revision 1.929 / (download) - annotate - [select for diffs], Mon Sep 23 15:41:11 2019 UTC (4 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.928: +3 -3 lines
Diff to previous 1.928 (colored)

Use the correct size for new windows when window-size is latest,
reported by Vamsi Krishna Avula in GitHub issue 1917.

Revision 1.928 / (download) - annotate - [select for diffs], Thu Sep 19 09:02:30 2019 UTC (4 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.927: +5 -1 lines
Diff to previous 1.927 (colored)

Add a "latest" window-size option which tries to size windows based on
the most recently used client. From Tommie Gannert in GitHub issue 1869
based on earlier changes from me.

Revision 1.927 / (download) - annotate - [select for diffs], Sun Sep 15 21:42:57 2019 UTC (4 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.926: +10 -3 lines
Diff to previous 1.926 (colored)

Add push-default and pop-default in styles to change the default colours
and attributes and use them to restore the previous behaviour of
window-status-style being the default for window-status-format in the
status line. From John Drouhard in GitHub issue 1912.

Revision 1.926 / (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.925: +2 -1 lines
Diff to previous 1.925 (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.925 / (download) - annotate - [select for diffs], Fri Aug 16 11:49:12 2019 UTC (4 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.924: +9 -2 lines
Diff to previous 1.924 (colored)

Add a flag to reverse sort in the various choose modes, from Benjamin
Poirier in GitHub issue 1875.

Revision 1.924 / (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.923: +4 -1 lines
Diff to previous 1.923 (colored)

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

Revision 1.923 / (download) - annotate - [select for diffs], Mon Aug 5 06:42:02 2019 UTC (4 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.922: +4 -1 lines
Diff to previous 1.922 (colored)

Add support for the SD (scroll down) escape sequence, GitHub issue 1861.

Revision 1.922 / (download) - annotate - [select for diffs], Mon Jul 15 18:25:07 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.921: +2 -2 lines
Diff to previous 1.921 (colored)

Make layout_fix_offsets take a window like layout_fix_panes.

Revision 1.921 / (download) - annotate - [select for diffs], Wed Jul 10 11:20:10 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.920: +2 -1 lines
Diff to previous 1.920 (colored)

Add -F to refresh-client to specify flags for control clients - one flag
at the moment, no-output which turns off forwarding pane output. From
Thomas Adam. GitHub issue 1834.

Revision 1.920 / (download) - annotate - [select for diffs], Tue Jul 9 14:03:12 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.919: +3 -2 lines
Diff to previous 1.919 (colored)

Add a -H flag to send-keys to send literal keys given as hex numbers
(needed for control clients to send mouse sequences). Also add some
format flags for UTF-8 and SGR mouse mode. Requested by Bradley Smith in
GitHub issues 1832 and 1833.

Revision 1.919 / (download) - annotate - [select for diffs], Sat Jul 6 20:37:29 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.918: +4 -4 lines
Diff to previous 1.918 (colored)

Correctly clear underscore colour in grid_get_cell1, also fix struct
grid_cell to avoid padding. Fixes increased memory use reported by Suraj
N Kurapati.

Revision 1.918 / (download) - annotate - [select for diffs], Mon Jul 1 06:56:00 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.917: +2 -1 lines
Diff to previous 1.917 (colored)

Add a "fill" style attribute to clear the entire format drawing area in
a colour, GitHub issue 1815.

Revision 1.917 / (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.916: +1 -2 lines
Diff to previous 1.916 (colored)

Do not double free window if pane fails to start.

Revision 1.916 / (download) - annotate - [select for diffs], Thu Jun 27 15:17:41 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.915: +5 -2 lines
Diff to previous 1.915 (colored)

Add support for underscore colours with Setulc capability, mostly from
Kai Moschcau.

Revision 1.915 / (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.914: +6 -1 lines
Diff to previous 1.914 (colored)

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

Revision 1.914 / (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.913: +14 -15 lines
Diff to previous 1.913 (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.913 / (download) - annotate - [select for diffs], Thu Jun 20 07:41:29 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.912: +4 -1 lines
Diff to previous 1.912 (colored)

Add a helper function to work out option table from name.

Revision 1.912 / (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.911: +2 -1 lines
Diff to previous 1.911 (colored)

Add a cmdq_continue function rather than twiddling the flag directly.

Revision 1.911 / (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.910: +6 -2 lines
Diff to previous 1.910 (colored)

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

Revision 1.910 / (download) - annotate - [select for diffs], Fri Jun 7 20:09:17 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.909: +2 -2 lines
Diff to previous 1.909 (colored)

Do not load the config file if the server is exiting because it failed
to start, otherwise commands like lsk which start the server again can
end up looping infinitely. Also make the first client exit
correctly. Problem reported by Wael M Nasreddine.

Revision 1.909 / (download) - annotate - [select for diffs], Wed Jun 5 20:00:53 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.908: +2 -1 lines
Diff to previous 1.908 (colored)

Add a -v flag to source-file to show the commands and line numbers.

Revision 1.908 / (download) - annotate - [select for diffs], Mon Jun 3 18:28:37 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.907: +2 -2 lines
Diff to previous 1.907 (colored)

Add new-session -X and attach-session -x to send SIGHUP to parent when
detaching (like detach-client -P). From Colin Watson in GitHub issue
1773.

Revision 1.907 / (download) - annotate - [select for diffs], Tue May 28 07:18:42 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.906: +14 -8 lines
Diff to previous 1.906 (colored)

Change display-menu from taking a single string to a set of arguments,
which is much easier to work with. Based on a diff from Avi Halachmi.

Revision 1.906 / (download) - annotate - [select for diffs], Sun May 26 17:34:45 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.905: +4 -2 lines
Diff to previous 1.905 (colored)

Add formats for word and line under the mouse and use them to add some
items to the pane menu.

Revision 1.905 / (download) - annotate - [select for diffs], Sat May 25 07:18:20 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.904: +3 -2 lines
Diff to previous 1.904 (colored)

Merge cmd_list_parse into cmd-parse.y so it can use the new alias
processing code.

Revision 1.904 / (download) - annotate - [select for diffs], Sat May 25 06:58:10 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.903: +2 -2 lines
Diff to previous 1.903 (colored)

Make cmd_log_argv take a printf-like format for the prefix.

Revision 1.903 / (download) - annotate - [select for diffs], Thu May 23 14:03:44 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.902: +3 -2 lines
Diff to previous 1.902 (colored)

Break the argument escaping code into a separate function and use it to
escape key bindings in list-keys. Also escape ~ and ; and $ properly.

Revision 1.902 / (download) - annotate - [select for diffs], Thu May 23 11:13:30 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.901: +53 -13 lines
Diff to previous 1.901 (colored)

Replace the split parser code (cfg.c and cmd-string.c) with a single
parser using yacc(1). This is a major change but is clearer and simpler
and allows some edge cases to be made more consistent, as well as
tidying up how aliases are handled. It will also allow some further
improvements later.

Entirely the same parser is now used for parsing the configuration file
and for string commands. This means that constructs previously only
available in .tmux.conf, such as %if, can now be used in string commands
(for example, those given to if-shell - not commands invoked from the
shell, they are still parsed by the shell itself).

The only syntax change I am aware of is that #{} outside quotes or a
comment is now considered a format and not a comment, so #{ is now a
syntax error (notably, if it is at the start of a line).

This also adds two new sections to the man page documenting the syntax
and outlining how parsing and command execution works.

Thanks to everyone who sent me test configs (they still all parse
without errors - but this doesn't mean they still work as intended!).

Thanks to Avi Halachmi for testing and man page improvements, also to
jmc@ for reviewing the man page changes.

Revision 1.901 / (download) - annotate - [select for diffs], Mon May 20 13:23:32 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.900: +4 -2 lines
Diff to previous 1.900 (colored)

Fix ordering of source-file with multiple files and add flags to load_cfg.

Revision 1.900 / (download) - annotate - [select for diffs], Mon May 20 11:46:06 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.899: +2 -1 lines
Diff to previous 1.899 (colored)

Replace the various identical error callbacks with a single one in cmd-queue.c.

Revision 1.899 / (download) - annotate - [select for diffs], Sat May 18 21:14:10 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.898: +2 -4 lines
Diff to previous 1.898 (colored)

Move the single command flag (CMD_CONTROL) into the shared flags.

Revision 1.898 / (download) - annotate - [select for diffs], Mon May 13 20:10:23 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.897: +3 -1 lines
Diff to previous 1.897 (colored)

Add support for overline (SGR 53), from Ricardo Banffy.

Revision 1.897 / (download) - annotate - [select for diffs], Sun May 12 08:58:09 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.896: +5 -3 lines
Diff to previous 1.896 (colored)

Add simple menus to tree, client, buffer modes.

Revision 1.896 / (download) - annotate - [select for diffs], Sun May 12 07:27:08 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.895: +2 -4 lines
Diff to previous 1.895 (colored)

Remove menu_create_from_items, I thought I would use it for some later
work but I don't need it.

Revision 1.895 / (download) - annotate - [select for diffs], Fri May 10 18:04:06 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.894: +17 -7 lines
Diff to previous 1.894 (colored)

Add support for simple menus usable with mouse or keyboard. New command
display-menu shows a menu (bound to the mouse on status line by default)
and a couple of extra formats for the default menus.

Revision 1.894 / (download) - annotate - [select for diffs], Fri May 10 14:12:47 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.893: +18 -2 lines
Diff to previous 1.893 (colored)

Add a function to draw a simple menu onto a screen.

Revision 1.893 / (download) - annotate - [select for diffs], Thu May 9 14:09:32 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.892: +2 -1 lines
Diff to previous 1.892 (colored)

Save mouse buttons as well as position.

Revision 1.892 / (download) - annotate - [select for diffs], Thu May 9 13:12:59 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.891: +4 -3 lines
Diff to previous 1.891 (colored)

send-keys also needs to insert key commands in the right order.

Revision 1.891 / (download) - annotate - [select for diffs], Wed May 8 18:07:12 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.890: +4 -2 lines
Diff to previous 1.890 (colored)

Add a flag to redraw only the overlay, and remove the overlay on resize.

Revision 1.890 / (download) - annotate - [select for diffs], Tue May 7 20:01:41 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.889: +28 -9 lines
Diff to previous 1.889 (colored)

Move around the display-panes identify code to make it a bit more
generic and hide the display-panes specific bits into
cmd-display-panes.c.

Revision 1.889 / (download) - annotate - [select for diffs], Tue May 7 11:24:03 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.888: +2 -2 lines
Diff to previous 1.888 (colored)

Treat keys in identify mode (display-panes) specially and handle them
immediately rather than queuing them (the command can block the queue
which means they were not being seen until it finished which was too
late). Reported by denis@ and solene@, ok solene@.

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

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

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

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

Revision 1.886 / (download) - annotate - [select for diffs], Fri May 3 15:43:01 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.885: +2 -2 lines
Diff to previous 1.885 (colored)

Correct ordering when adding after an existing item.

Revision 1.885 / (download) - annotate - [select for diffs], Fri May 3 14:51:31 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.884: +11 -4 lines
Diff to previous 1.884 (colored)

Instead of processing keys all together, put them up on the client
command queue so they are ordered correctly with the commands that they
execute.

Revision 1.884 / (download) - annotate - [select for diffs], Sun Apr 28 20:05:50 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.883: +5 -1 lines
Diff to previous 1.883 (colored)

Support multiple occurances of the same argument. Use this for a new
flag -e to new-window, split-window, respawn-window, respawn-pane to
pass environment variables into the newly created process. From Steffen
Christgau in GitHub issue 1697.

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

Merge hooks into options and make each one an array option. This allows
multiple commands to be easily bound to one hook. set-hook and
show-hooks remain but they are now variants of set-option and
show-options. show-options now has a -H flag to show hooks (by default
they are not shown).

Revision 1.882 / (download) - annotate - [select for diffs], Thu Apr 25 18:18:55 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.881: +2 -2 lines
Diff to previous 1.881 (colored)

Make options_tostring allocate its result instead of using a stack
buffer (needed for something in the future).

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

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

Revision 1.880 / (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.879: +43 -17 lines
Diff to previous 1.879 (colored)

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

Revision 1.879 / (download) - annotate - [select for diffs], Tue Apr 2 09:03:39 2019 UTC (5 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.878: +2 -2 lines
Diff to previous 1.878 (colored)

Add an argument to copy commands to set the prefix for the buffer name,
allows buffers for different sessions to be named separately.

Revision 1.878 / (download) - annotate - [select for diffs], Tue Apr 2 08:45:32 2019 UTC (5 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.877: +3 -3 lines
Diff to previous 1.877 (colored)

Store and restore cursor across reflow by working out a position based
on unwrapped lines, rather than a grid offset. Fixes problems reported
by Thomas Sattler and Paul de Weerd.

Revision 1.877 / (download) - annotate - [select for diffs], Mon Mar 25 18:59:55 2019 UTC (5 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.876: +3 -1 lines
Diff to previous 1.876 (colored)

Add StatusDefault binding for the mouse on any otherwise unassigned
parts of the status line, from Avi Halachmi.

Revision 1.876 / (download) - annotate - [select for diffs], Wed Mar 20 19:19:11 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.875: +6 -4 lines
Diff to previous 1.875 (colored)

Improve cursor positioning after reflow by storing the position as an
offset into the entire history before reflow and restoring it aftewards.

Revision 1.875 / (download) - annotate - [select for diffs], Mon Mar 18 21:46:02 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.874: +1 -7 lines
Diff to previous 1.874 (colored)

The individual -fg, -bg and -attr options have been deprecated (in
favour of -style), undocumented and hidden from show-options since
2014. Remove them, except for status-fg and status-bg.

Revision 1.874 / (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.873: +67 -20 lines
Diff to previous 1.873 (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.873 / (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.872: +5 -1 lines
Diff to previous 1.872 (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.872 / (download) - annotate - [select for diffs], Mon Mar 18 11:58:40 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.871: +7 -2 lines
Diff to previous 1.871 (colored)

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

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

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

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

Tidy and rename some bits of status line code.

Revision 1.869 / (download) - annotate - [select for diffs], Fri Mar 15 21:54:47 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.868: +2 -1 lines
Diff to previous 1.868 (colored)

Add a way to set individual defaults for an array option.

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

Move status line free into its own function.

Revision 1.867 / (download) - annotate - [select for diffs], Fri Mar 15 10:48:05 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.866: +1 -3 lines
Diff to previous 1.866 (colored)

Remove unused member of struct client.

Revision 1.866 / (download) - annotate - [select for diffs], Fri Mar 15 10:04:13 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.865: +2 -1 lines
Diff to previous 1.865 (colored)

Add a -v flag to display-message to show verbose messages as the format
is parsed, this gives the user a way to debug problems with formats
rather than just being confronted with (for example) a blank status
line.

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

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

Revision 1.864 / (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.863: +17 -11 lines
Diff to previous 1.863 (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.863 / (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.862: +4 -4 lines
Diff to previous 1.862 (colored)

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

Revision 1.862 / (download) - annotate - [select for diffs], Tue Mar 12 23:21:45 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.861: +2 -1 lines
Diff to previous 1.861 (colored)

Set a flag on cells are genuinely empty (cleared and never written to)
and use tty_clear_line (which will choose the best escape sequence) to
clear any batches of cells with that flag when redrawing a line from the
stored screen.

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

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

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

Fix HPA in origin mode.

Revision 1.859 / (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.858: +2 -3 lines
Diff to previous 1.858 (colored)

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

Revision 1.858 / (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.857: +7 -2 lines
Diff to previous 1.857 (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.857 / (download) - annotate - [select for diffs], Tue Mar 12 07:39:27 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.856: +2 -1 lines
Diff to previous 1.856 (colored)

Add support for origin mode (DECOM, SM/RM ?6), from Marc Reisner.

Revision 1.856 / (download) - annotate - [select for diffs], Fri Mar 8 10:34:20 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.855: +2 -3 lines
Diff to previous 1.855 (colored)

Make the mode used to view command output (a variant of copy mode) use
its own mode definition struct with a different init function rather
than calling special setup functions.

Revision 1.855 / (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.854: +22 -12 lines
Diff to previous 1.854 (colored)

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

Revision 1.854 / (download) - annotate - [select for diffs], Thu Mar 7 19:01:21 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.853: +3 -3 lines
Diff to previous 1.853 (colored)

Make adding mode formats a function pointer as well.

Revision 1.853 / (download) - annotate - [select for diffs], Sat Feb 16 11:42:08 2019 UTC (5 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.852: +2 -1 lines
Diff to previous 1.852 (colored)

Use starting client cwd in config file, GitHub issue 1606.

Revision 1.852 / (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.851: +7 -4 lines
Diff to previous 1.851 (colored)

Pass window into mode functions.

Revision 1.851 / (download) - annotate - [select for diffs], Thu Nov 22 10:36:40 2018 UTC (5 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.850: +2 -1 lines
Diff to previous 1.850 (colored)

Do not use PWD unless it actually matches the real working directory.

Revision 1.850 / (download) - annotate - [select for diffs], Thu Oct 25 15:13:38 2018 UTC (5 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.849: +4 -1 lines
Diff to previous 1.849 (colored)

Add a "terminal" colour which can be used instead of "default" in style
options for the terminal default colour, bypassing any inheritance from
other options. Prompted by a discussion with abieber@.

Revision 1.849 / (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.848: +59 -21 lines
Diff to previous 1.848 (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.848 / (download) - annotate - [select for diffs], Thu Oct 18 07:57:57 2018 UTC (5 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.847: +14 -1 lines
Diff to previous 1.847 (colored)

Support for extended underline styles on terminals which offer them,
enabled by adding the Smulx capability with terminal-overrides (add
something like ',vte*:Smulx=\E[4\:%p1%dm'). GitHub issue 1492.

Revision 1.847 / (download) - annotate - [select for diffs], Wed Oct 3 15:27:55 2018 UTC (5 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.846: +2 -2 lines
Diff to previous 1.846 (colored)

Do not move the cursor when the mouse wheel is used, GitHub issue 1493.

Revision 1.846 / (download) - annotate - [select for diffs], Tue Sep 25 14:27:20 2018 UTC (5 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.845: +3 -6 lines
Diff to previous 1.845 (colored)

Allow panes to be 1 line or column by redrawing instead of using the
scroll region, from Soeren Tempel in GitHub issue 1487.

Revision 1.845 / (download) - annotate - [select for diffs], Wed Aug 29 09:50:32 2018 UTC (5 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.844: +2 -1 lines
Diff to previous 1.844 (colored)

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

Revision 1.844 / (download) - annotate - [select for diffs], Thu Aug 23 15:45:05 2018 UTC (5 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.843: +13 -34 lines
Diff to previous 1.843 (colored)

Move job struct into job.c.

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

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

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

Move offset of window list into status struct.

Revision 1.841 / (download) - annotate - [select for diffs], Sun Aug 19 20:13:07 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.840: +6 -2 lines
Diff to previous 1.840 (colored)

Add a flag to force redrawing of the status line even if the content
hasn't changed, needed for resizing.

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

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

Revision 1.839 / (download) - annotate - [select for diffs], Sat Aug 18 20:08:52 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.838: +3 -4 lines
Diff to previous 1.838 (colored)

SESSION_UNATTACHED flag is no longer necessary now we have an attached
count instead.

Revision 1.838 / (download) - annotate - [select for diffs], Sat Aug 18 16:14:03 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.837: +2 -1 lines
Diff to previous 1.837 (colored)

Some tidying and helper functions.

Revision 1.837 / (download) - annotate - [select for diffs], Thu Aug 9 09:53:44 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.836: +5 -4 lines
Diff to previous 1.836 (colored)

Bump the UTF-8 character array up to 18 to allow for more combining
characters (some languages use up to five). This size doesn't make as
much difference now that UTF-8 goes into an extended cell. GitHub issue
1430.

Revision 1.836 / (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.835: +2 -1 lines
Diff to previous 1.835 (colored)

Log command arguments.

Revision 1.835 / (download) - annotate - [select for diffs], Thu Aug 2 11:56:12 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.834: +1 -4 lines
Diff to previous 1.834 (colored)

session_groups can be static also.

Revision 1.834 / (download) - annotate - [select for diffs], Thu Aug 2 11:44:07 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.833: +6 -9 lines
Diff to previous 1.833 (colored)

Make key trees and some other bits static.

Revision 1.833 / (download) - annotate - [select for diffs], Thu Aug 2 11:18:34 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.832: +11 -10 lines
Diff to previous 1.832 (colored)

Minor tidying.

Revision 1.832 / (download) - annotate - [select for diffs], Thu Aug 2 07:55:16 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.831: +2 -1 lines
Diff to previous 1.831 (colored)

Make display-panes block the client until a pane is chosen or it times out.

Revision 1.831 / (download) - annotate - [select for diffs], Tue Jul 31 11:49:26 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.830: +5 -27 lines
Diff to previous 1.830 (colored)

Move struct screen_sel into screen.c and tidy up members that are only
used by copy mode.

Revision 1.830 / (download) - annotate - [select for diffs], Mon Jul 30 11:24:55 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.829: +1 -23 lines
Diff to previous 1.829 (colored)

Remove a leftover unused struct.

Revision 1.829 / (download) - annotate - [select for diffs], Mon Jul 16 08:48:22 2018 UTC (5 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.828: +4 -1 lines
Diff to previous 1.828 (colored)

Add an "Any" key to run a command if a key is pressed that is not bound
in the current key table. GitHub issue 1404.

Revision 1.828 / (download) - annotate - [select for diffs], Wed Jul 4 12:30:52 2018 UTC (5 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.827: +2 -1 lines
Diff to previous 1.827 (colored)

Add set-hook -R to run a hook immediately (useful to set multiple hooks
to the same thing).

Revision 1.827 / (download) - annotate - [select for diffs], Wed Jul 4 09:44:07 2018 UTC (5 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.826: +3 -1 lines
Diff to previous 1.826 (colored)

Add accessors for grid linedata member, for some future work. From Dan
Aloni.

Revision 1.826 / (download) - annotate - [select for diffs], Fri Jun 8 20:54:22 2018 UTC (5 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.825: +4 -1 lines
Diff to previous 1.825 (colored)

Instead of working out which pane to resize with the mouse by walking
the panes list, look through the layout cells for the nearest border and
resize that cell. From Dan Aloni in GitHub issue 1374.

Revision 1.825 / (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.824: +2 -2 lines
Diff to previous 1.824 (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.824 / (download) - annotate - [select for diffs], Wed Apr 18 14:35:37 2018 UTC (6 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.823: +2 -1 lines
Diff to previous 1.823 (colored)

Change how display-message uses the client. Originally it was only
intended as the target client where the message should be displayed but
at some point (perhaps when -p was added), it was used for format
expansion too. This means it can get a bit weird where you have client
formats expanding for a client with a different current session than the
target session.

However, it is nice that display-message can be used to show information
about a specific client. So change so that the -c client will be used if
the session matches the target session (-t or default), otherwise the
best client will be chosen.

Revision 1.823 / (download) - annotate - [select for diffs], Tue Apr 10 10:48:44 2018 UTC (6 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.822: +2 -1 lines
Diff to previous 1.822 (colored)

Add x and X to choose-tree (with a confirmation prompt) to kill an
item. Suggested by Matt Zagrabelny.

Revision 1.822 / (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.821: +2 -2 lines
Diff to previous 1.821 (colored)

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

Revision 1.821 / (download) - annotate - [select for diffs], Thu Mar 8 08:09:10 2018 UTC (6 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.820: +5 -2 lines
Diff to previous 1.820 (colored)

Add a missing client-detached hook when the server shuts down, and do
not exit until jobs started from run-shell/if-shell have finished (add a
job flags member and a flag to indicate other jobs). GitHub issue 1245.

Revision 1.820 / (download) - annotate - [select for diffs], Wed Feb 28 08:55:44 2018 UTC (6 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.819: +2 -1 lines
Diff to previous 1.819 (colored)

Add -Z flag to choose-tree, choose-client, choose-buffer to
automatically zoom the pane when the mode is entered and unzoom when it
exits, assuming the pane is not already zoomed. Add -Z to the default
key bindings.

Revision 1.819 / (download) - annotate - [select for diffs], Fri Feb 16 09:51:41 2018 UTC (6 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.818: +2 -1 lines
Diff to previous 1.818 (colored)

Reflowing the grid in-place involved way too much memmove() for a big
performance cost with a large history. Instead change back to using a
second grid and copying modified lines over which is much faster (this
doesn't revert to the old code however which didn't support UTF-8
properly). GitHub issue 1249.

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

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

Revision 1.817 / (download) - annotate - [select for diffs], Sun Feb 4 10:10:39 2018 UTC (6 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.816: +2 -1 lines
Diff to previous 1.816 (colored)

Upstream ncurses has introduced terminfo capabilities to specify RGB
colour ("true" or "direct" colour). These consist of new entries (such
as "xterm-direct") which have a different setaf/setab implementation,
colors and pairs set to 0x1000000 and 0x10000, and a new RGB flag.

The setaf/setab definitions seem to be geared towards what ncurses (or
emacs maybe) needs, in that the new versions do only ANSI and RGB
colours (they can't be used for the 256 colour palette); they rely on
the silly ISO colon-separated version of SGR; and they use a weird
multiplication scheme so they still only need one argument. The higher
values of colors and pairs require a recent ncurses to parse.

tmux can use the RGB flag to detect RGB colour support (keeping the old
Tc extension for backwards compatibility for now). However, as we still
want to send 256 colour information unchanged when possible, the new
setaf/setab are awkward. So when RGB is present, reserve setaf/setab
only for ANSI colours and use the escape sequences directly for 256 and
RGB colours. (To my knowledge no recent terminal uses unusual escape
sequences for these in any case.)

Revision 1.816 / (download) - annotate - [select for diffs], Thu Jan 18 07:10:53 2018 UTC (6 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.815: +1 -3 lines
Diff to previous 1.815 (colored)

Remove unused hooks_run function, from Thomas Adam.

Revision 1.815 / (download) - annotate - [select for diffs], Tue Dec 19 15:00:39 2017 UTC (6 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.814: +2 -2 lines
Diff to previous 1.814 (colored)

Report better error from server when socket create fails, GitHub issue
1201.

Revision 1.814 / (download) - annotate - [select for diffs], Wed Nov 15 19:59:27 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.813: +3 -1 lines
Diff to previous 1.813 (colored)

Add a common function for spreading out cells and use it for the two
even layouts and to add a -E flag to select-layout to spread out cells
evenly without changing parent cells.

Revision 1.813 / (download) - annotate - [select for diffs], Wed Nov 15 19:21:24 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.812: +2 -2 lines
Diff to previous 1.812 (colored)

Completely rewrite the reflow code to correctly handle double width
characters (previously they were not accounted for).

Revision 1.812 / (download) - annotate - [select for diffs], Fri Nov 3 17:02:33 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.811: +4 -2 lines
Diff to previous 1.811 (colored)

Support mouse on preview in tree mode.

Revision 1.811 / (download) - annotate - [select for diffs], Thu Nov 2 22:00:42 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.810: +10 -7 lines
Diff to previous 1.810 (colored)

Make the mode draw function use the parent screen directly rather than
its own to avoid copying twice.

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

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

Revision 1.809 / (download) - annotate - [select for diffs], Thu Nov 2 18:27:35 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.808: +2 -1 lines
Diff to previous 1.808 (colored)

Only show the first member of session groups in tree mode (-G flag
disables).

Revision 1.808 / (download) - annotate - [select for diffs], Wed Oct 25 11:26:11 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.807: +2 -2 lines
Diff to previous 1.807 (colored)

Add P key to paste tagged in buffer mode, and trim some code that should
no longer be necessary.

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

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

Revision 1.806 / (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.805: +3 -1 lines
Diff to previous 1.805 (colored)

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

Revision 1.805 / (download) - annotate - [select for diffs], Thu Oct 5 13:29:18 2017 UTC (6 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.804: +5 -1 lines
Diff to previous 1.804 (colored)

Add support for the xterm(1) title stack, from Brad Town, GitHub issue
1075.

Revision 1.804 / (download) - annotate - [select for diffs], Wed Aug 30 18:13:47 2017 UTC (6 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.803: +2 -2 lines
Diff to previous 1.803 (colored)

Instead of overloading the line clear function to mean free if
background is default (8), introduce an explicit free function and use
it where a free alone is needed. Likewise, use memmove directly rather
than grid_move_lines where it makes sense. Based on a memory leak fix by
Dan Aloni in GitHub issue 1051.

Revision 1.803 / (download) - annotate - [select for diffs], Wed Aug 30 10:33:57 2017 UTC (6 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.802: +12 -10 lines
Diff to previous 1.802 (colored)

Pass flags into cmd_find_from_* to fix prefer-unattached, reported by
Thomas Sattler.

Revision 1.802 / (download) - annotate - [select for diffs], Mon Aug 28 12:36:38 2017 UTC (6 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.801: +1 -2 lines
Diff to previous 1.801 (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.801 / (download) - annotate - [select for diffs], Sun Aug 27 08:33:55 2017 UTC (6 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.800: +3 -1 lines
Diff to previous 1.800 (colored)

Use kind and kri for S-Up/Down as well as kUP and kDN.

Revision 1.800 / (download) - annotate - [select for diffs], Wed Aug 16 12:12:54 2017 UTC (6 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.799: +2 -2 lines
Diff to previous 1.799 (colored)

Add -d flag to display-panes to specify timeout, and make 0 mean no
timeout. From Laurens Post.

Revision 1.799 / (download) - annotate - [select for diffs], Wed Aug 16 11:46:08 2017 UTC (6 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.798: +6 -6 lines
Diff to previous 1.798 (colored)

Rename BELL_* values to ALERT_* now they are used by more than bells,
based on a diff from Brad Town.

Revision 1.798 / (download) - annotate - [select for diffs], Wed Aug 2 11:10:48 2017 UTC (6 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.797: +3 -2 lines
Diff to previous 1.797 (colored)

Add selection_present format so commands in copy mode can use it, GitHub
issue 1028.

Revision 1.797 / (download) - annotate - [select for diffs], Wed Jul 26 16:14:08 2017 UTC (6 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.796: +6 -1 lines
Diff to previous 1.796 (colored)

Make bell, activity and silence alerting more consistent:

- remove the bell-on-alert option;

- add activity-action and silence-action options with the same possible
  values as the existing bell-action;

- add "both" value for the visual-bell, visual-activity and
  visual-silence options to trigger both a bell and a message.

This means all three work the same way. Based on changes from Yvain Thonnart.

Revision 1.796 / (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.795: +2 -2 lines
Diff to previous 1.795 (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.795 / (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.794: +6 -8 lines
Diff to previous 1.794 (colored)

Move signal code into proc.c.

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

Make shell_command a global like other stuff rather than making it an
exception and using callback argument.

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

proc_send_s now seems unnecessary.

Revision 1.792 / (download) - annotate - [select for diffs], Sun Jul 9 22:33:09 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.791: +2 -2 lines
Diff to previous 1.791 (colored)

Some extra logging to show why tmux might exit.

Revision 1.791 / (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.790: +2 -3 lines
Diff to previous 1.790 (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.790 / (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.789: +4 -2 lines
Diff to previous 1.789 (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.789 / (download) - annotate - [select for diffs], Fri Jun 30 22:24:08 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.788: +3 -2 lines
Diff to previous 1.788 (colored)

Try to show a better preview of sessions and windows in tree mode.

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

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

Revision 1.787 / (download) - annotate - [select for diffs], Fri Jun 23 15:36:52 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.786: +5 -1 lines
Diff to previous 1.786 (colored)

Add user-keys option to allow user-defined keys to be set, from Dan
Aloni.

Revision 1.786 / (download) - annotate - [select for diffs], Mon Jun 12 07:04:24 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.785: +5 -1 lines
Diff to previous 1.785 (colored)

Add explicit keys for the bracketed paste sequences, both to avoid mix
ups with other keys and to make logs clearer.

Revision 1.785 / (download) - annotate - [select for diffs], Fri Jun 9 16:01:39 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.784: +5 -4 lines
Diff to previous 1.784 (colored)

Extend filters (f key) to buffer and client mode and add -f flag to
specify to command.

Revision 1.784 / (download) - annotate - [select for diffs], Fri Jun 9 15:29:15 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.783: +2 -2 lines
Diff to previous 1.783 (colored)

Add -O option to choose-* to set initial sort order.

Revision 1.783 / (download) - annotate - [select for diffs], Wed Jun 7 15:27:46 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.782: +3 -3 lines
Diff to previous 1.782 (colored)

Return 1 if name matches not 0, also fix some spaces.

Revision 1.782 / (download) - annotate - [select for diffs], Wed Jun 7 14:37:30 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.781: +4 -4 lines
Diff to previous 1.781 (colored)

Add simple searching (C-s and n) to the various choose modes: by name
for client and tree, and by name and content for buffer.

Revision 1.781 / (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.780: +2 -1 lines
Diff to previous 1.780 (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.780 / (download) - annotate - [select for diffs], Sun Jun 4 08:25:57 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.779: +3 -1 lines
Diff to previous 1.779 (colored)

Support SIGUSR2 to stop and start logging for an existing server. Also
we currently only have two log levels so just use -v and -vv rather than
-v and -vvvv, and clarify the man page entry for -v.

Revision 1.779 / (download) - annotate - [select for diffs], Wed May 31 11:00:00 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.778: +5 -4 lines
Diff to previous 1.778 (colored)

Some applications like vi(1) and tmux until 10 minutes or so ago, do not
redraw on SIGWINCH if the size returns to the original size between the
original SIGWINCH and when they get around to calling TIOCGWINSZ. So use
the existing resize timer to introduce a small delay between the two
resizes.

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

It is not OK to ignore SIGWINCH if SIOCGWINSZ reports the size has
unchanged, because it may have changed and changed back in the time
between us getting the signal and calling ioctl(). Always redraw when we
see SIGWINCH.

Revision 1.777 / (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.776: +4 -1 lines
Diff to previous 1.776 (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.776 / (download) - annotate - [select for diffs], Wed May 31 08:43:44 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.775: +82 -77 lines
Diff to previous 1.775 (colored)

Look for setrgbf and setrgbb terminfo extensions for RGB colour. This is
the most reasonable of the various (some bizarre) suggestions for
capabilities.

Revision 1.775 / (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.774: +47 -24 lines
Diff to previous 1.774 (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.774 / (download) - annotate - [select for diffs], Mon May 29 20:42:53 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.773: +2 -1 lines
Diff to previous 1.773 (colored)

Add a flag to stop the prompt input being expanded.

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

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

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

Function to count clients.

Revision 1.771 / (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.770: +3 -2 lines
Diff to previous 1.770 (colored)

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

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

Tidy command prompt callbacks and pass in the client.

Revision 1.769 / (download) - annotate - [select for diffs], Mon May 15 16:44:04 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.768: +3 -1 lines
Diff to previous 1.768 (colored)

Check the terminfo(5) U8 capability and disable using UTF-8 for ACS if
it is present and zero. This is useful for users with terminals or fonts
that do not correctly support UTF-8 line drawing characters. GitHub
issue 927, reported by Hiroaki Yamazoe and Akinori Hattori.

Revision 1.768 / (download) - annotate - [select for diffs], Mon May 15 07:54:44 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.767: +1 -1 lines
Diff to previous 1.767 (colored)

The Konsole SU bug means it can't clear the entire scroll region (it
ignores if >= size, not if > as I first thought). So we can't
effectively fix it in code - remove the workarounds which just cause
bugs on other terminals.

Revision 1.767 / (download) - annotate - [select for diffs], Fri May 12 13:00:56 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.766: +8 -7 lines
Diff to previous 1.766 (colored)

Scrolling needs to use background colour.

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

ECH needs to use background colour.

Revision 1.765 / (download) - annotate - [select for diffs], Fri May 12 10:45:38 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.764: +2 -2 lines
Diff to previous 1.764 (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.764 / (download) - annotate - [select for diffs], Thu May 11 07:34:54 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.763: +2 -2 lines
Diff to previous 1.763 (colored)

Make environ_log prefix take a format.

Revision 1.763 / (download) - annotate - [select for diffs], Wed May 10 16:48:36 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.762: +2 -1 lines
Diff to previous 1.762 (colored)

Prevent control clients from affecting the session size until they have
specified a size with refresh-client -C. Prompted by a different change
with the same purpose from George Nachman.

Revision 1.762 / (download) - annotate - [select for diffs], Wed May 10 10:46:59 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.761: +3 -3 lines
Diff to previous 1.761 (colored)

Insert copy mode bindings at the right place in the command queue.

Revision 1.761 / (download) - annotate - [select for diffs], Tue May 9 13:04:36 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.760: +2 -1 lines
Diff to previous 1.760 (colored)

If the current screen was complex enough, it was possible to make redraw
itself hit the "terminal can't keep up" check. To avoid this, record how
much data we send during redraw (we know we will be starting with 0) and
skip the check until it has been flushed. GitHub issue 912.

Revision 1.760 / (download) - annotate - [select for diffs], Sun May 7 22:27:57 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.759: +13 -10 lines
Diff to previous 1.759 (colored)

Add a format for the name of the pane's mode, lets it be used as a
conditional for key bindings.

Revision 1.759 / (download) - annotate - [select for diffs], Sun May 7 21:25:59 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.758: +3 -2 lines
Diff to previous 1.758 (colored)

Up to now, tmux sees \033\033[OA as M-Up and since we turned on
xterm-keys by default, generates \033[1;3A instead of
\033\033[OA. Unfortunately this confuses vi, which doesn't understand
xterm keys and now sees Escape+Up pressed within escape-time as Escape
followed by A.

The issue doesn't happen in xterm itself because it gets the keys from X
and can distinguish between a genuine M-Up and Escape+Up.

Because xterm can, tmux can too: xterm will give us \033[1;3A (that is,
kUP3) for a real M-Up and \033\033OA for Escape+Up - in fact, we can be
sure any \033 preceding an xterm key is a real Escape key press because
Meta would be part of the xterm key instead of a separate \033.

So change tmux to recognise both sequences as M-Up for its own purposes,
but generate the xterm version of M-Up only if it originally received
the xterm version from the terminal.

This means we will return to sending \033\033OA instead of the xterm key
for terminals that do not support xterm keys themselves, but there is no
practical way around this because they do not allow us to distinguish
between Escape+Up and M-Up. xterm style escape sequences are now the de
facto standard for these keys in any case.

Problem reported by jsing@ and subsequently by Cecile Tonglet in GitHub
issue 907.

Revision 1.758 / (download) - annotate - [select for diffs], Thu May 4 07:16:43 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.757: +4 -1 lines
Diff to previous 1.757 (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.757 / (download) - annotate - [select for diffs], Wed May 3 05:53:34 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.756: +2 -1 lines
Diff to previous 1.756 (colored)

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

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

In order that people can use formats like #D in #() in the status line
and not have to wait for an update when they change pane, we allow
commands to run more than once a second if the expanded form
changes. Unfortunately this can mean them being run far too often
(pretty much continually) when multiple clients exist, because some
formats (including #D) will always differ between clients.

To avoid this, give each client its own tree of jobs which means that
the same command will be different instances for each client - similar
to how we have the tag to separate commands for different panes.

GitHub issue 889; test case reported by Paul Johnson.

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

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

Revision 1.754 / (download) - annotate - [select for diffs], Tue Apr 25 18:30:29 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.753: +2 -1 lines
Diff to previous 1.753 (colored)

Make full width panes try to play more nicely with terminal copy and
paste by avoiding explicit line wraps if we think the terminal will wrap
anyway.

Revision 1.753 / (download) - annotate - [select for diffs], Tue Apr 25 18:20:51 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.752: +1 -2 lines
Diff to previous 1.752 (colored)

When we write out the grid including escape sequences, an SGR 0 needs to
cause the colours to be written again. Also treat colours separately
from attributes so that RGB colours will work.

Revision 1.752 / (download) - annotate - [select for diffs], Tue Apr 25 15:35:10 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.751: +2 -2 lines
Diff to previous 1.751 (colored)

Do not update TERM into config file parsing has finished.

Revision 1.751 / (download) - annotate - [select for diffs], Sat Apr 22 10:22:39 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.750: +15 -39 lines
Diff to previous 1.750 (colored)

Get rid of the extra layer of flags and cmd_prepare() and just store the
CMD_FIND_* flags in the cmd_entry and call it for the command. Commands
with special requirements call it themselves and update the target for
hooks to use.

Revision 1.750 / (download) - annotate - [select for diffs], Fri Apr 21 20:26:34 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.749: +10 -11 lines
Diff to previous 1.749 (colored)

Make the cmd_find_* functions more obvious when looking for a client,
rather than having it inside other functions. Should be no change to the
way targets are resolved just yet.

Revision 1.749 / (download) - annotate - [select for diffs], Fri Apr 21 18:18:17 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.748: +1 -2 lines
Diff to previous 1.748 (colored)

Style nits and an unused struct.

Revision 1.748 / (download) - annotate - [select for diffs], Fri Apr 21 17:22:20 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.747: +5 -3 lines
Diff to previous 1.747 (colored)

Add cmd_find_from_winlink_pane and use it in a couple of places, and
make functions that can't fail void.

Revision 1.747 / (download) - annotate - [select for diffs], Fri Apr 21 16:04:18 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.746: +1 -2 lines
Diff to previous 1.746 (colored)

It is annoying that the copy mode key table (or any other key table)
will suppress root key table bindings. So change to always check the
root table if no binding is found in the current table (whether it be
the prefix table from pressing the prefix or the copy mode table from a
pane).

A root key binding can be blocked by binding the key to a command that
does nothing (like send-keys with no arguments).

Problem reported by Thomas Sattler.

Revision 1.746 / (download) - annotate - [select for diffs], Fri Apr 21 14:09:44 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.745: +3 -3 lines
Diff to previous 1.745 (colored)

More unnecessary arguments now winlink points back to session.

Revision 1.745 / (download) - annotate - [select for diffs], Fri Apr 21 14:01:19 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.744: +19 -8 lines
Diff to previous 1.744 (colored)

Store state shared between multiple commands in the queue in a shared
structure.

Revision 1.744 / (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.743: +1 -5 lines
Diff to previous 1.743 (colored)

Use fdforkpty() instead of our own unwrapped versions.

Revision 1.743 / (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.742: +2 -2 lines
Diff to previous 1.742 (colored)

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

Revision 1.742 / (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.741: +2 -2 lines
Diff to previous 1.741 (colored)

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

Revision 1.741 / (download) - annotate - [select for diffs], Thu Apr 20 09:20:22 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.740: +21 -16 lines
Diff to previous 1.740 (colored)

If a #() command doesn't exit, use its most recent line of output (it
must be a full line). Don't let it redraw the status line more than once
a second.

Requested by someone about 10 years ago...

Revision 1.740 / (download) - annotate - [select for diffs], Wed Apr 19 14:00:28 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.739: +3 -2 lines
Diff to previous 1.739 (colored)

Add a suspend helper function, and do not allow detaching or suspending
while already doing so.

Revision 1.739 / (download) - annotate - [select for diffs], Wed Apr 19 06:52:27 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.738: +7 -2 lines
Diff to previous 1.738 (colored)

When the data we have buffered to write to a terminal grows beyond a
reasonable amount (currently width * height * 8 bytes), discard all
output to the terminal and start trying to redraw periodically
instead. Continue with this until the amount of data we are trying to
write falls to a low level again.

This helps to prevent tmux sitting on a huge buffer of data when there
are processes with fast output running inside tmux but the outside
terminal is slow.

A new client_discarded format holds the amount of data that has been
discarded due to this mechanism.

The three variables (when to start this, when to stop, and how often to
redraw) are basically "works for me" at the moment, this is going in to
see how it goes and if it causes problems for anyone else.

Revision 1.738 / (download) - annotate - [select for diffs], Tue Apr 18 21:41:42 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.737: +2 -4 lines
Diff to previous 1.737 (colored)

Revert use of DECSLRM on iTerm2, it doesn't help as much as we throught,
and there are some question marks about it's support.

Revision 1.737 / (download) - annotate - [select for diffs], Tue Apr 18 18:21:37 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.736: +4 -2 lines
Diff to previous 1.736 (colored)

Detect iTerm2 and use DECSLRM for it as well.

Revision 1.736 / (download) - annotate - [select for diffs], Tue Apr 18 15:44:17 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.735: +2 -1 lines
Diff to previous 1.735 (colored)

Add a format for number of bytes writtent to client, useful for debugging.

Revision 1.735 / (download) - annotate - [select for diffs], Mon Apr 17 06:40:32 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.734: +3 -3 lines
Diff to previous 1.734 (colored)

Remove a couple of redraw flags that no longer have any effect.

Revision 1.734 / (download) - annotate - [select for diffs], Wed Apr 5 10:49:46 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.733: +2 -2 lines
Diff to previous 1.733 (colored)

Give each client a name. This defaults to the tty name as before but
falls back to an alternative if the tty name is not available. This is
clearer than overloading the client ttyname member and allows us to
remove the path stored in the tty struct, it should always be the same
as the client.

Revision 1.733 / (download) - annotate - [select for diffs], Wed Mar 22 07:16:54 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.732: +6 -4 lines
Diff to previous 1.732 (colored)

Add support for the strikethrough attribute (SGR 9), using the new smxx
terminfo capability. This means there are now nine attribute bits, so
anything above 0xff uses an extended cell.

Revision 1.732 / (download) - annotate - [select for diffs], Thu Mar 9 17:06:35 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.731: +3 -3 lines
Diff to previous 1.731 (colored)

Move the client identify (display-panes) code into server-client.c.

Revision 1.731 / (download) - annotate - [select for diffs], Thu Mar 9 17:02:38 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.730: +2 -2 lines
Diff to previous 1.730 (colored)

Move server_fill_environ into environ.c and move some other common code
into it.

Revision 1.730 / (download) - annotate - [select for diffs], Wed Mar 8 13:36:12 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.729: +4 -1 lines
Diff to previous 1.729 (colored)

Add a helper function for the most common format_create/defaults/expand
pattern.

Revision 1.729 / (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.728: +2 -2 lines
Diff to previous 1.728 (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.728 / (download) - annotate - [select for diffs], Tue Feb 21 14:18:12 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.727: +1 -4 lines
Diff to previous 1.727 (colored)

Don't need is1,is2,is3 so remove them.

Revision 1.727 / (download) - annotate - [select for diffs], Tue Feb 14 18:13:05 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.726: +3 -1 lines
Diff to previous 1.726 (colored)

Make source-file look for files relative to the client working directory
(like load-buffer and save-buffer), from Chris Pickel. Also break the
where-is-this-file code out into its own function for loadb and saveb.

Revision 1.726 / (download) - annotate - [select for diffs], Fri Feb 10 12:59:18 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.725: +5 -2 lines
Diff to previous 1.725 (colored)

Don't use a bufferevent for the tty, so we can keep better track of what
is being written and when.

Also a manpage typo fix from jmc@.

Revision 1.725 / (download) - annotate - [select for diffs], Thu Feb 9 15:04:53 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.724: +14 -10 lines
Diff to previous 1.724 (colored)

Instead of numbering session groups, give them a name which may be given
to -t instead of a target session. Also allow them to contain only one
session.

Revision 1.724 / (download) - annotate - [select for diffs], Thu Feb 9 12:09:33 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.723: +3 -1 lines
Diff to previous 1.723 (colored)

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

Revision 1.723 / (download) - annotate - [select for diffs], Wed Feb 8 23:53:03 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.722: +3 -3 lines
Diff to previous 1.722 (colored)

Another helper function to write to terminal and log.

Revision 1.722 / (download) - annotate - [select for diffs], Wed Feb 8 23:47:35 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.721: +2 -1 lines
Diff to previous 1.721 (colored)

Add a common function to invalidate all the terminal cached state.

Revision 1.721 / (download) - annotate - [select for diffs], Wed Feb 8 17:31:09 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.720: +5 -1 lines
Diff to previous 1.720 (colored)

Add support for scroll up escape sequence (CSI S) and use it when
possible instead of sending individual line feeds.

Revision 1.720 / (download) - annotate - [select for diffs], Wed Feb 8 16:45:18 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.719: +15 -6 lines
Diff to previous 1.719 (colored)

Collect sequences of printable ASCII characters and process them
together instead of handling them one by one. This is significantly
faster. Sequences are terminated when we reach the end of the line, fill
the internal buffer, or a different character is seen by the input
parser (an escape sequence, or UTF-8).

Rather than writing collected sequences out immediately, hold them until
it is necessary (another screen modification, or we consume all
available data). This means we can discard changes that would have no
effect (for example, lines that would just be scrolled off the screen or
cleared). This reduces the total amount of data we write out to the
terminal - not important for fast terminals, but a big help with slow
(like xterm).

Revision 1.719 / (download) - annotate - [select for diffs], Wed Feb 8 08:50:10 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.718: +1 -4 lines
Diff to previous 1.718 (colored)

Trying to avoid the occasional newline by saving the last cell on screen
is not actually helping us much and just adds complexity, so don't
bother.

Revision 1.718 / (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.717: +4 -17 lines
Diff to previous 1.717 (colored)

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

Revision 1.717 / (download) - annotate - [select for diffs], Mon Feb 6 22:05:11 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.716: +2 -1 lines
Diff to previous 1.716 (colored)

Use DECFRA on VT420 compatible terminals (so, xterm) and ED on all
others for clearing panes.

Revision 1.716 / (download) - annotate - [select for diffs], Mon Feb 6 19:45:23 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.715: +4 -1 lines
Diff to previous 1.715 (colored)

Do not go through the whole attributes setting process if the new cell
is the same as the previous one.

Revision 1.715 / (download) - annotate - [select for diffs], Mon Feb 6 19:26:49 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.714: +2 -2 lines
Diff to previous 1.714 (colored)

Add BCE for clear to start of screen, which was somehow missed.

Revision 1.714 / (download) - annotate - [select for diffs], Mon Feb 6 15:00:41 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.713: +2 -1 lines
Diff to previous 1.713 (colored)

Cancel key table when switching session, unless the key is going to
repeat. Reported by Amos Bird.

Revision 1.713 / (download) - annotate - [select for diffs], Mon Feb 6 13:23:00 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.712: +1 -2 lines
Diff to previous 1.712 (colored)

Only redraw the modified character when adding combining characters, not
the whole line.

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

Cache status line position to reduce option lookups during output.

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

Add a window or pane id "tag" to each format tree and use it to separate
jobs, this means that if the same job is used for different windows or
panes (for example in pane-border-format), it will be run separately for
each pane.

Revision 1.710 / (download) - annotate - [select for diffs], Wed Feb 1 09:55:07 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.709: +4 -2 lines
Diff to previous 1.709 (colored)

Implement "all event" (1003) mouse mode but in a way that works. The
main issue is that if we have two panes, A with 1002 and B with 1003, we
need to set 1003 outside tmux in order to get all the mouse events, but
then we need to suppress the ones that pane A doesn't want. This is easy
in SGR mouse mode, because buttons == 3 is only used for movement events
(for other events the trailing m/M marks a release instead), but in
normal mouse mode we can't tell so easily. So for that, look at the
previous event instead - if it is drag+release as well, then the current
event is a movement event.

Revision 1.709 / (download) - annotate - [select for diffs], Mon Jan 30 21:41:17 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.708: +2 -2 lines
Diff to previous 1.708 (colored)

When a flag option is used in a format, it should use the number form
not string.

Revision 1.708 / (download) - annotate - [select for diffs], Wed Jan 25 14:36:08 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.707: +1 -1 lines
Diff to previous 1.707 (colored)

Revert previous for now, it will break TERM=screen.

Revision 1.707 / (download) - annotate - [select for diffs], Wed Jan 25 14:24:54 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.706: +2 -2 lines
Diff to previous 1.706 (colored)

If xterm-keys is on, use xterm(1) style keys for Home and End as well as
modified keys.

Revision 1.706 / (download) - annotate - [select for diffs], Tue Jan 24 21:50:23 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.705: +2 -64 lines
Diff to previous 1.705 (colored)

Fixed keys for choose mode, and remove the last mode keys bits.

Revision 1.705 / (download) - annotate - [select for diffs], Tue Jan 24 20:15:32 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.704: +2 -2 lines
Diff to previous 1.704 (colored)

Make update-environment an array as well.

Revision 1.704 / (download) - annotate - [select for diffs], Tue Jan 24 19:53:37 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.703: +2 -1 lines
Diff to previous 1.703 (colored)

Add support for custom command aliases, this is an array option which
contains items of the form "alias=command". This is consulted when an
unknown command is parsed.

Revision 1.703 / (download) - annotate - [select for diffs], Tue Jan 24 19:11:46 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.702: +8 -4 lines
Diff to previous 1.702 (colored)

If given an array option without an index either show or set all items,
and support -a for array options. Allow the separator for set to be
specified in the options table (will be used for backwards compatibility
later).

Revision 1.702 / (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.701: +6 -1 lines
Diff to previous 1.701 (colored)

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

ok deraadt

Revision 1.701 / (download) - annotate - [select for diffs], Wed Jan 18 10:08:05 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.700: +2 -1 lines
Diff to previous 1.700 (colored)

Plain stravis() because it will mangle UTF-8 characters, so add
utf8_stravis() which calls our existing utf8_strvis() and use it instead

Revision 1.700 / (download) - annotate - [select for diffs], Mon Jan 16 14:52:25 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.699: +1 -2 lines
Diff to previous 1.699 (colored)

Revert WIP parts of previous I didn't mean to commit yet.

Revision 1.699 / (download) - annotate - [select for diffs], Mon Jan 16 14:49:14 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.698: +28 -27 lines
Diff to previous 1.698 (colored)

getopt() has a struct option so just return to using options_entry.

Revision 1.698 / (download) - annotate - [select for diffs], Sun Jan 15 22:00:56 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.697: +2 -3 lines
Diff to previous 1.697 (colored)

It is silly for cmd_list_parse to return an integer error when it could
just return NULL.

Revision 1.697 / (download) - annotate - [select for diffs], Sun Jan 15 20:48:41 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.696: +38 -41 lines
Diff to previous 1.696 (colored)

Major tidy up and rework of options tree and set-option/show-options
commands this pushes more of the code into options.c and ties it more
closely to the options table rather than having an unnecessary
split. Also add support for array options (will be used later). Only
(intentional) user visible change is that show-options output is now
passed through vis(3) with VIS_DQ so quotes are escaped.

Revision 1.696 / (download) - annotate - [select for diffs], Fri Jan 13 11:58:49 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.695: +2 -2 lines
Diff to previous 1.695 (colored)

options_get_style return const too.

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

Make options_get_string return const string.

Revision 1.694 / (download) - annotate - [select for diffs], Fri Jan 13 10:12:12 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.693: +3 -1 lines
Diff to previous 1.693 (colored)

Add -E to detach-client to exec a command to replace the client instead
of exiting it, useful if tmux wasn't exec'd itself. From Jenna Magius.

Revision 1.693 / (download) - annotate - [select for diffs], Thu Jan 12 15:36:35 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.692: +5 -5 lines
Diff to previous 1.692 (colored)

Simplify appending to string options.

Revision 1.692 / (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.691: +2 -2 lines
Diff to previous 1.691 (colored)

Put all palette functions together in the file.

Revision 1.691 / (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.690: +2 -6 lines
Diff to previous 1.690 (colored)

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

Revision 1.690 / (download) - annotate - [select for diffs], Wed Jan 11 16:09:57 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.689: +3 -4 lines
Diff to previous 1.689 (colored)

Add a format for terminal type.

Revision 1.689 / (download) - annotate - [select for diffs], Wed Jan 11 16:05:46 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.688: +3 -1 lines
Diff to previous 1.688 (colored)

Use a macro for looking up tty types.

Revision 1.688 / (download) - annotate - [select for diffs], Wed Jan 11 14:56:44 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.687: +2 -2 lines
Diff to previous 1.687 (colored)

Some tidying and tweaks to options code.

Revision 1.687 / (download) - annotate - [select for diffs], Mon Jan 9 21:03:25 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.686: +2 -1 lines
Diff to previous 1.686 (colored)

Add simple comparisons in formats: #{==:a,b} and #{!=:a,b} ("a" and "b"
are expanded so can compare formats). And expand the condition to
#{?a,b,c} (the "a" part) if it doesn't work as a simple lookup.

Also add FORMAT_NOJOBS flag to disable jobs in a format.

Revision 1.686 / (download) - annotate - [select for diffs], Mon Jan 9 19:27:00 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.685: +2 -2 lines
Diff to previous 1.685 (colored)

Run the source-file pattern through glob(3).

Revision 1.685 / (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.684: +12 -1 lines
Diff to previous 1.684 (colored)

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

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

Incremental search in copy mode (on for emacs keys by default) - much
the same as normal searching but updates the cursor position and marked
search terms as you type. C-r and C-s in the prompt repeat the search,
once finished searching (with Enter), N and n work as before.

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

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

Revision 1.682 / (download) - annotate - [select for diffs], Wed Dec 28 10:34:34 2016 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.681: +2 -2 lines
Diff to previous 1.681 (colored)

Fix the prefer unattached session behaviour of
attach-session/switch-client, reported by Thomas Sattle.

Revision 1.681 / (download) - annotate - [select for diffs], Thu Nov 24 18:45:45 2016 UTC (7 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.680: +2 -1 lines
Diff to previous 1.680 (colored)

The mouse valid flag needs to be correct before we fire the dragging
callback, so move the callback outside of server_client_check_mouse and
use a new special key code to indicate it.

Revision 1.680 / (download) - annotate - [select for diffs], Thu Nov 24 13:38:44 2016 UTC (7 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.679: +4 -1 lines
Diff to previous 1.679 (colored)

Make the selection able to exist independent of the cursor position, so
that it is not affected by scrolling. If MouseDragEnd1Pane is bound to
the new "stop-selection" command:

    bind -Tcopy-mode MouseDragEnd1Pane stop-selection

A selection made with the mouse will stay as it is after button 1 is
released. (It also works bound to a key.)

From Artem Fokin.

Revision 1.679 / (download) - annotate - [select for diffs], Wed Nov 23 17:01:24 2016 UTC (7 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.678: +2 -2 lines
Diff to previous 1.678 (colored)

For mouse keys, use the mouse pane as the default current pane.

Revision 1.678 / (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.677: +2 -1 lines
Diff to previous 1.677 (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.677 / (download) - annotate - [select for diffs], Tue Nov 15 15:17:28 2016 UTC (7 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.676: +3 -3 lines
Diff to previous 1.676 (colored)

Turn on margins, with a couple of fixes (only limit to the pane for line
feeds, and do not move cursor to end for full width panes).

Revision 1.676 / (download) - annotate - [select for diffs], Tue Nov 15 14:02:32 2016 UTC (7 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.675: +15 -1 lines
Diff to previous 1.675 (colored)

Initial attempt to make use of left and right margins if the terminal
supports them (that is, if it advertises itself as a VT420 - probably
just xterm). These are the vertical equivalent of the scroll region and
allow much faster scrolling of panes that do not take up the full width
of the terminal.

Revision 1.675 / (download) - annotate - [select for diffs], Fri Nov 4 14:47:38 2016 UTC (7 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.674: +2 -2 lines
Diff to previous 1.674 (colored)

enum values need to fit in 32 bits; we only use enum for numbering and
Unicode characters fit in 24 bits, so we can leave key_code as 64 bits
and change KEYC_BASE down to 0x10000000.

Revision 1.674 / (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.673: +8 -2 lines
Diff to previous 1.673 (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.673 / (download) - annotate - [select for diffs], Tue Oct 18 08:46:43 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.672: +4 -2 lines
Diff to previous 1.672 (colored)

Give each item on queue a name for better logging.

Revision 1.672 / (download) - annotate - [select for diffs], Sun Oct 16 22:18:04 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.671: +2 -1 lines
Diff to previous 1.671 (colored)

Use notifys for alerts too.

Revision 1.671 / (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.670: +7 -10 lines
Diff to previous 1.670 (colored)

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

Revision 1.670 / (download) - annotate - [select for diffs], Sun Oct 16 19:36:37 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.669: +5 -2 lines
Diff to previous 1.669 (colored)

Provide a way for hooks to tag formats onto the commands they fire so
that the user can get at additional information - now used for the
"hook" format, more to come.

Revision 1.669 / (download) - annotate - [select for diffs], Sun Oct 16 19:15:02 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.668: +1 -2 lines
Diff to previous 1.668 (colored)

Notifys can go via the command queue instead of using their own queue.

Revision 1.668 / (download) - annotate - [select for diffs], Sun Oct 16 19:04:05 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.667: +42 -42 lines
Diff to previous 1.667 (colored)

Mass rename struct cmd_q to struct cmdq_item and related.

Revision 1.667 / (download) - annotate - [select for diffs], Sun Oct 16 17:55:14 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.666: +136 -134 lines
Diff to previous 1.666 (colored)

Rewrite command queue handling. Each client still has a command queue,
but there is also now a global command queue. Instead of command queues
being dispatched on demand from wherever the command happens to be
added, they are now all dispatched from the top level server
loop. Command queues may now also include callbacks as well as commands,
and items may be inserted after the current command as well as at the end.

This all makes command queues significantly more predictable and easier
to use, and avoids the complex multiple nested command queues used by
source-file, if-shell and friends.

A mass rename of struct cmdq to a better name (cmdq_item probably) is
coming.

Revision 1.666 / (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.665: +3 -3 lines
Diff to previous 1.665 (colored)

Give window_create and window_create1 better names.

Revision 1.665 / (download) - annotate - [select for diffs], Sat Oct 15 00:12:58 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.664: +2 -2 lines
Diff to previous 1.664 (colored)

Rename a function for consistency and some spacing nits.

Revision 1.664 / (download) - annotate - [select for diffs], Sat Oct 15 00:09:30 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.663: +3 -1 lines
Diff to previous 1.663 (colored)

Fire hooks on the simple notifys (window-renamed and session-renamed),
the complicated ones get no hooks for now (more to come).

Revision 1.663 / (download) - annotate - [select for diffs], Sat Oct 15 00:01:01 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.662: +2 -3 lines
Diff to previous 1.662 (colored)

Drain notifys once at the end of the server loop instead of doing it
from the end of every command queue (which could be nested).

Revision 1.662 / (download) - annotate - [select for diffs], Thu Oct 13 22:48:51 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.661: +3 -3 lines
Diff to previous 1.661 (colored)

Trying to do hooks generically is way too complicated and unreliable and
confusing, particularly trying to automatically figure out what target
hooks should be using. So simplify it:

- drop before hooks entirely, they don't seem to be very useful;

- commands with special requirements now fire their own after hook (for
  example, if they change session or window, or if they have -t and -s
  and need to choose which one the hook uses as current target);

- commands with no special requirements can have the CMD_AFTERHOOK flag
  added and they will use the -t state.

At the moment new-session, new-window, split-window fire their own hook,
and display-message uses the flag. The remaining commands still need to
be looked at.

Revision 1.661 / (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.660: +36 -30 lines
Diff to previous 1.660 (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.660 / (download) - annotate - [select for diffs], Thu Oct 13 10:01:49 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.659: +2 -1 lines
Diff to previous 1.659 (colored)

Some improvements and bug fixes for hooks:

- Prepare the state again before the "after" hooks are run, because the
  command may have killed or moved windows.

- Use the hooks list from the newly prepared target, not the old hooks
  list (only matters for new-session really).

- Correctly detect an invalid current state and ignore it in
  cmd_find_target ("killw; swapw").

- Change neww, new, killp, killw, splitw, swapp, swapw to update the
  current state (used if no explicit target is given) to something more
  useful after they have finished. For example, neww changes it to the
  newly created window.

Hooks are still relatively new and primitive so there are likely to be
more changes to come.

Parts based on bug reports from Uwe Werler and Iblis Lin.

Revision 1.659 / (download) - annotate - [select for diffs], Wed Oct 12 15:26:37 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.658: +1 -3 lines
Diff to previous 1.658 (colored)

bind-key -c has gone, remove from man page, and unused table declarations.

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

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

Revision 1.657 / (download) - annotate - [select for diffs], Wed Oct 12 13:24:07 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.656: +3 -1 lines
Diff to previous 1.656 (colored)

Redraw selection in tty_draw_line, so it appears when redrawing whole
pane. Reported by Theo Buehler.

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

The repeat prompt in both emacs and vi (and the old one in tmux) doesn't
support line editing and instead executes a command as soon as a
non-number key is pressed. Add a -N flag to command-prompt for the same
in copy mode. Reported by Theo Buehler.

Revision 1.655 / (download) - annotate - [select for diffs], Tue Oct 11 13:45:47 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.654: +2 -10 lines
Diff to previous 1.654 (colored)

Some other stuff that can be local to one file.

Revision 1.654 / (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.653: +1 -22 lines
Diff to previous 1.653 (colored)

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

Revision 1.653 / (download) - annotate - [select for diffs], Tue Oct 11 09:30:36 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.652: +15 -1 lines
Diff to previous 1.652 (colored)

Support double and triple clicks (they are cumulative, so double is
fired then triple), and use for select-word and select-line in copy
mode. Inspired by a different solution from Omar Sandoval.

Revision 1.652 / (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.651: +9 -57 lines
Diff to previous 1.651 (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.651 / (download) - annotate - [select for diffs], Tue Oct 11 07:11:40 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.650: +4 -2 lines
Diff to previous 1.650 (colored)

Support UTF-8 entry into the command prompt.

Revision 1.650 / (download) - annotate - [select for diffs], Mon Oct 10 17:28:30 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.649: +2 -2 lines
Diff to previous 1.649 (colored)

Do not allow the opposite pane to resize when dragging with the mouse
because it is not possible to keep the mouse on the border when the
minimum size is reached.

Revision 1.649 / (download) - annotate - [select for diffs], Mon Oct 10 13:54:47 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.648: +1 -3 lines
Diff to previous 1.648 (colored)

Some more static.

Revision 1.648 / (download) - annotate - [select for diffs], Sun Oct 9 16:24:34 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.647: +2 -1 lines
Diff to previous 1.647 (colored)

Make the CLIENT_STATUS flag imply that pane status lines are redrawn if
they are enabled and break the actual screen generation code into a
separate function. Fixes problems reported by Romain Francoise.

Revision 1.647 / (download) - annotate - [select for diffs], Wed Oct 5 12:34:05 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.646: +3 -1 lines
Diff to previous 1.646 (colored)

Keep buffer creation time and add accessors for it and the order number.

Revision 1.646 / (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.645: +3 -1 lines
Diff to previous 1.645 (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.645 / (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.644: +16 -3 lines
Diff to previous 1.644 (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.644 / (download) - annotate - [select for diffs], Mon Sep 12 15:40:58 2016 UTC (7 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.643: +3 -2 lines
Diff to previous 1.643 (colored)

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

Revision 1.643 / (download) - annotate - [select for diffs], Sun Sep 4 17:37:06 2016 UTC (7 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.642: +2 -2 lines
Diff to previous 1.642 (colored)

Add support for performing a full width split (with splitw -f), rather
than splitting the current cell. From Stephen Kent.

Revision 1.642 / (download) - annotate - [select for diffs], Fri Sep 2 20:57:20 2016 UTC (7 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.641: +2 -1 lines
Diff to previous 1.641 (colored)

Remember the number of lines scrolled into the history (versus cleared
into the history) and when resizing only use scrolled lines and not
cleared lines (which are probably not intended to reappear). From
Chaoren Lin.

Revision 1.641 / (download) - annotate - [select for diffs], Wed Aug 3 09:07:02 2016 UTC (7 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.640: +4 -5 lines
Diff to previous 1.640 (colored)

Fix minimum size when pane status line is enabled, reported by Y Petremann.

Revision 1.640 / (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.639: +2 -2 lines
Diff to previous 1.639 (colored)

Tweak output of environment logging.

Revision 1.639 / (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.638: +2 -1 lines
Diff to previous 1.638 (colored)

Log environment to new panes.

Revision 1.638 / (download) - annotate - [select for diffs], Fri Jul 15 00:49:08 2016 UTC (7 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.637: +25 -16 lines
Diff to previous 1.637 (colored)

Don't update cells in each block of data read from a pane immediately,
instead track them as change (dirty) and update them once at the end,
saves much time if repeatedly writing the same cell. Also fix comparison
of cells being equal in a few places (memcmp is not enough).

Revision 1.637 / (download) - annotate - [select for diffs], Fri Jul 15 00:42:56 2016 UTC (7 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.636: +11 -22 lines
Diff to previous 1.636 (colored)

Instead of representing colours in several different forms with various
cell flags, convert to use an int with flags marking 256 or RGB colours
in the top byte (except in cells, which we don't want to make any
bigger). From Brad Town.

Revision 1.636 / (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.635: +4 -2 lines
Diff to previous 1.635 (colored)

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

Revision 1.635 / (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.634: +4 -1 lines
Diff to previous 1.634 (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.634 / (download) - annotate - [select for diffs], Mon Jun 6 07:28:52 2016 UTC (7 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.633: +2 -1 lines
Diff to previous 1.633 (colored)

Cache selected state so that cells going from selected to unselected are not
skipped, reported by Omar Sandoval.

Revision 1.633 / (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.632: +3 -2 lines
Diff to previous 1.632 (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.632 / (download) - annotate - [select for diffs], Mon May 30 09:50:20 2016 UTC (7 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.631: +5 -1 lines
Diff to previous 1.631 (colored)

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

Revision 1.631 / (download) - annotate - [select for diffs], Fri May 27 17:05:42 2016 UTC (7 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.630: +1 -2 lines
Diff to previous 1.630 (colored)

Use getprogname() instead of __progname to make portability easier.

Revision 1.630 / (download) - annotate - [select for diffs], Thu May 12 16:05:33 2016 UTC (8 years ago) by tim
Branch: MAIN
Changes since 1.629: +2 -2 lines
Diff to previous 1.629 (colored)

- Rework load_cfg() error handling a little.
- Add -q to source-file to suppress errors about nonexistent files.

Input and OK nicm@

Revision 1.629 / (download) - annotate - [select for diffs], Sun May 1 13:39:05 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.628: +2 -2 lines
Diff to previous 1.628 (colored)

Use the same code for half page scrolling as full, from Michal Mazurek.

Revision 1.628 / (download) - annotate - [select for diffs], Sat Apr 30 18:59:02 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.627: +1 -2 lines
Diff to previous 1.627 (colored)

tty_client_ready can not be internal to tty.c again.

Revision 1.627 / (download) - annotate - [select for diffs], Fri Apr 29 15:00:48 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.626: +4 -1 lines
Diff to previous 1.626 (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.626 / (download) - annotate - [select for diffs], Fri Apr 29 13:36:10 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.625: +3 -11 lines
Diff to previous 1.625 (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.625 / (download) - annotate - [select for diffs], Fri Apr 29 13:21:33 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.624: +6 -6 lines
Diff to previous 1.624 (colored)

Make the grid_cell passed into screen_write_* const.

Revision 1.624 / (download) - annotate - [select for diffs], Wed Apr 27 09:39:09 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.623: +3 -1 lines
Diff to previous 1.623 (colored)

Add next/previous paragraph, from J Raynor.

Revision 1.623 / (download) - annotate - [select for diffs], Fri Mar 18 07:28:27 2016 UTC (8 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.622: +4 -1 lines
Diff to previous 1.622 (colored)

Instead of reusing MouseUp at the finish of a drag, add a new key
MouseDragEnd. It can be useful to bind them separately in copy mode.

Revision 1.622 / (download) - annotate - [select for diffs], Wed Mar 2 15:36:02 2016 UTC (8 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.621: +2 -3 lines
Diff to previous 1.621 (colored)

Handle wcwidth() and mbtowc() failures in better style and drop
characters where we can't find the width (wcwidth() fails) on input, the
same as we drop invalid UTF-8. Suggested by schwarze@.

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

Use system wcwidth() instead of carrying around UTF-8 width tables.

Revision 1.620 / (download) - annotate - [select for diffs], Sun Jan 31 09:57:41 2016 UTC (8 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.619: +2 -1 lines
Diff to previous 1.619 (colored)

Whoops, need this for the previous reverse trim commit too.

Revision 1.619 / (download) - annotate - [select for diffs], Fri Jan 29 11:13:56 2016 UTC (8 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.618: +19 -3 lines
Diff to previous 1.618 (colored)

Support for RGB colour, using the extended cell mechanism to avoid
wasting unnecessary space. The 'Tc' flag must be set in the external
TERM entry (using terminal-overrides or a custom terminfo entry), if not
tmux will map to the closest of the 256 or 16 colour palettes.

Mostly from Suraj N Kurapati, based on a diff originally by someone else.

Revision 1.618 / (download) - annotate - [select for diffs], Tue Jan 19 16:01:30 2016 UTC (8 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.617: +8 -4 lines
Diff to previous 1.617 (colored)

Split out getting the current state from the target search so it can be
replaced if we already know the current.

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

I no longer use my SourceForge address so replace it.

Revision 1.616 / (download) - annotate - [select for diffs], Sat Jan 16 00:36:53 2016 UTC (8 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.615: +3 -1 lines
Diff to previous 1.615 (colored)

Add hooks for alerts (bell, silence, activity), from Thomas Adam.

Revision 1.615 / (download) - annotate - [select for diffs], Fri Jan 15 11:31:47 2016 UTC (8 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.614: +2 -2 lines
Diff to previous 1.614 (colored)

A couple of missing printflike attributes, from Andrey Starodubtsev.

Revision 1.614 / (download) - annotate - [select for diffs], Wed Dec 16 22:05:35 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.613: +2 -2 lines
Diff to previous 1.613 (colored)

send-keys -R should reset the input parser to ground state (so it can be
used to escape from, for example, printf '\033]2;').

Revision 1.613 / (download) - annotate - [select for diffs], Wed Dec 16 21:50:37 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.612: +13 -6 lines
Diff to previous 1.612 (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.612 / (download) - annotate - [select for diffs], Tue Dec 15 13:43:07 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.611: +8 -2 lines
Diff to previous 1.611 (colored)

Some hooks API changes to fire a hook while waiting another cmdq and
infrastructure that will be needed soon.

Revision 1.611 / (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.610: +5 -4 lines
Diff to previous 1.610 (colored)

Make the marked pane a cmd_find_state.

Revision 1.610 / (download) - annotate - [select for diffs], Mon Dec 14 23:30:58 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.609: +4 -1 lines
Diff to previous 1.609 (colored)

Use cmd_find_clear_state instead of an extra function doing the same.

Revision 1.609 / (download) - annotate - [select for diffs], Mon Dec 14 00:31:54 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.608: +30 -25 lines
Diff to previous 1.608 (colored)

Instead of combined flags for -c, -s, -t, split into different sets
using an enum and simplify the parsing code.

Revision 1.608 / (download) - annotate - [select for diffs], Sun Dec 13 21:53:57 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.607: +11 -9 lines
Diff to previous 1.607 (colored)

Use member names in cmd_entry definitions so I stop getting confused
about the order.

Revision 1.607 / (download) - annotate - [select for diffs], Sun Dec 13 18:31:47 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.606: +2 -1 lines
Diff to previous 1.606 (colored)

-c needs to be able for fail for display-message.

Revision 1.606 / (download) - annotate - [select for diffs], Sun Dec 13 17:55:14 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.605: +28 -35 lines
Diff to previous 1.605 (colored)

Use struct cmd_find_state directly and remove cmd_state_flag, also
change so that winlink is set even if an index is too.

Revision 1.605 / (download) - annotate - [select for diffs], Sun Dec 13 16:44:35 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.604: +3 -3 lines
Diff to previous 1.604 (colored)

Change cmd_find_target to use a state struct from the caller.

Revision 1.604 / (download) - annotate - [select for diffs], Sun Dec 13 15:32:12 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.603: +29 -13 lines
Diff to previous 1.603 (colored)

Remove the cmd_find_{session,window,pane,index} functions (which are
just wrappers around cmd_find_target) and just use cmd_find_target
directly.

Revision 1.603 / (download) - annotate - [select for diffs], Sun Dec 13 14:32:38 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.602: +41 -3 lines
Diff to previous 1.602 (colored)

Instead of every command resolving the target (-t or -s) itself, prepare
the state (client, session, winlink, pane) for it it before entering the
command. Each command provides some flags that tell the prepare step
what it is expecting.

This is a requirement for having hooks on commands (for example, if you
hook "select-window -t1:2", the hook command should to operate on window
1:2 not whatever it thinks is the current window), and should allow some
other target improvements.

The old cmd_find_* functions remain for the moment but that layer will
be dropped later.

Joint work with Thomas Adam.

Revision 1.602 / (download) - annotate - [select for diffs], Sat Dec 12 18:32:24 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.601: +3 -1 lines
Diff to previous 1.601 (colored)

Add key-table option to set the default key table for a session, allows
different key bindings for different sessions and a few other things.

Revision 1.601 / (download) - annotate - [select for diffs], Sat Dec 12 18:19:00 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.600: +2 -1 lines
Diff to previous 1.600 (colored)

Allow prefix and prefix2 to be set to None to disable (useful if you
would rather bind the prefix in the root table).

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

Style nits and line wrapping of function declarations.

Revision 1.599 / (download) - annotate - [select for diffs], Fri Dec 11 15:46:57 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.598: +3 -3 lines
Diff to previous 1.598 (colored)

We cannot do hooks_find and then hooks_remove because it might have come
from the parent (global) tree, instead make it remove by name like options.

While here, also tidy up a few bits of options and hooks handling (use
RB_FOREACH_SAFE, and a helper function for the free).

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

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

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

Remove format_create_flags and just pass flags to format_create.

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

Spacing nits.

Revision 1.595 / (download) - annotate - [select for diffs], Tue Dec 8 01:10:31 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.594: +28 -5 lines
Diff to previous 1.594 (colored)

Add hooks infrastructure, basic commands (set-hook, show-hooks) and a
couple of not very useful client hooks. This will eventually let
commands be run at various points and on notifications. Joint work with
Thomas Adam.

Revision 1.594 / (download) - annotate - [select for diffs], Mon Dec 7 09:47:41 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.593: +2 -1 lines
Diff to previous 1.593 (colored)

Fix bell indicators across detach, reported by Torbjorn Lonnemark, diff
from Thomas Adam.

Revision 1.593 / (download) - annotate - [select for diffs], Fri Nov 27 15:06:43 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.592: +4 -4 lines
Diff to previous 1.592 (colored)

Do not set a limit on the length of commands when printing them.

Revision 1.592 / (download) - annotate - [select for diffs], Tue Nov 24 23:46:15 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.591: +5 -3 lines
Diff to previous 1.591 (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.591 / (download) - annotate - [select for diffs], Tue Nov 24 23:22:51 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.590: +2 -3 lines
Diff to previous 1.590 (colored)

Shell command from -c doesn't have to be global, pass it as an argument.

Revision 1.590 / (download) - annotate - [select for diffs], Tue Nov 24 22:27:22 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.589: +2 -2 lines
Diff to previous 1.589 (colored)

Tidy the code that works out the socket path, and just use the full path
in the global socket_path rather than copying it.

Revision 1.589 / (download) - annotate - [select for diffs], Tue Nov 24 21:52:06 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.588: +4 -4 lines
Diff to previous 1.588 (colored)

Remove the -I part of show-messages which isn't really that useful; the
server start time can now be accessed with a new start_time format (use:
tmux display -p '#{t:start_time}')

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

Make the log stuff a bit tidier with some helper functions.

Revision 1.587 / (download) - annotate - [select for diffs], Tue Nov 24 09:34:55 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.586: +2 -1 lines
Diff to previous 1.586 (colored)

Don't allow options in table without scope set.

Revision 1.586 / (download) - annotate - [select for diffs], Mon Nov 23 23:47:57 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.585: +2 -2 lines
Diff to previous 1.585 (colored)

Partly revert previous, it is harmless to keep support for UTF-8 mouse
mode inside tmux, just no longer support it for tmux itself.

Revision 1.585 / (download) - annotate - [select for diffs], Mon Nov 23 20:53:09 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.584: +2 -2 lines
Diff to previous 1.584 (colored)

Remove support for the UTF-8 mouse extension. This was a briefly used,
poor idea that was fairly quickly replaced by SGR mouse input (which is
now widespread). It is impossible to tell the difference between UTF-8
and non-UTF-8 mouse input; since the mouse-utf8 option was removed tmux
has not handled it correctly in any case; and it is ridiculous to have
three different forms of mouse input.

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

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

Revision 1.583 / (download) - annotate - [select for diffs], Thu Nov 19 22:46:46 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.582: +5 -4 lines
Diff to previous 1.582 (colored)

Only assume pasting with at least two characters, reduces problems for
people who can type ^B c very fast, or who are using tmux inside
something else that buffers.

Revision 1.582 / (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.581: +1 -4 lines
Diff to previous 1.581 (colored)

Use __unused rather than rolling our own.

Revision 1.581 / (download) - annotate - [select for diffs], Wed Nov 18 13:06:54 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.580: +5 -18 lines
Diff to previous 1.580 (colored)

Sync the entire xmalloc.[ch] with the other users, but with the addition
of xrealloc, xvasprintf, xvsnprintf.

Revision 1.580 / (download) - annotate - [select for diffs], Sun Nov 15 22:50:38 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.579: +7 -9 lines
Diff to previous 1.579 (colored)

Make key_code unsigned long long not uint64_t which is more portable for
printf formats, and move UTF8_SIZE define down to near the rest of the
UTF-8 bits.

Revision 1.579 / (download) - annotate - [select for diffs], Sat Nov 14 11:45:43 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.578: +9 -4 lines
Diff to previous 1.578 (colored)

All these return values from utf8_* are confusing, use an enum.

Revision 1.578 / (download) - annotate - [select for diffs], Sat Nov 14 10:56:31 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.577: +2 -2 lines
Diff to previous 1.577 (colored)

Be more strict about invalid UTF-8.

Revision 1.577 / (download) - annotate - [select for diffs], Sat Nov 14 09:41:07 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.576: +3 -3 lines
Diff to previous 1.576 (colored)

Push stdout and stderr to clients more aggressively, and add an event to
continue if the send fails.

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

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

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

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

Revision 1.575 / (download) - annotate - [select for diffs], Thu Nov 12 12:43:36 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.574: +2 -1 lines
Diff to previous 1.574 (colored)

Add utf8_padcstr and use it to align columns in list-keys.

Revision 1.574 / (download) - annotate - [select for diffs], Thu Nov 12 12:19:57 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.573: +2 -2 lines
Diff to previous 1.573 (colored)

Tidy utf8.c a little: build table on first use, and make utf8_width take
a u_int rather than splitting and then combining again in utf8_split.

Revision 1.573 / (download) - annotate - [select for diffs], Thu Nov 12 11:10:50 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.572: +2 -1 lines
Diff to previous 1.572 (colored)

If we know the terminal outside tmux is not UTF-8, replace UTF-8 in
error messages and whatnot with underscores the same as we do when we
draw UTF-8 characters as part of the screen.

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

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

Revision 1.571 / (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.570: +47 -39 lines
Diff to previous 1.570 (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.570 / (download) - annotate - [select for diffs], Sat Oct 31 13:12:03 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.569: +2 -3 lines
Diff to previous 1.569 (colored)

The output log is only useful once and it means creating a file, so open
it once at startup instead of in every call to tty_open.

Revision 1.569 / (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.568: +11 -11 lines
Diff to previous 1.568 (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.568 / (download) - annotate - [select for diffs], Wed Oct 28 09:51:55 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.567: +16 -15 lines
Diff to previous 1.567 (colored)

Like options, move the environ struct into environ.c.

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

Move struct options into options.c.

Revision 1.566 / (download) - annotate - [select for diffs], Tue Oct 27 13:23:24 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.565: +20 -13 lines
Diff to previous 1.565 (colored)

Break the common process set up, event loop and imsg dispatch code
between server and client out into a separate internal API. This will
make it easier to add another process.

Revision 1.565 / (download) - annotate - [select for diffs], Sun Oct 25 22:29:17 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.564: +1 -2 lines
Diff to previous 1.564 (colored)

Extend the modifiers allowed before formats: as well as the existing
#{=10:...}  length limit, add #{t:...} to convert a time_t format to a
string, #{b:...} for basename and #{d:...} for dirname. Remove all the
foo_string time formats as they can now be replaced by "t:", for example
#{window_activity_string} becomes #{t:window_activity}.

Revision 1.564 / (download) - annotate - [select for diffs], Fri Oct 23 16:02:21 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.563: +2 -1 lines
Diff to previous 1.563 (colored)

Format for scroll position, from Jorge Morante.

Revision 1.563 / (download) - annotate - [select for diffs], Sun Oct 18 20:42:42 2015 UTC (8 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.562: +3 -2 lines
Diff to previous 1.562 (colored)

Pass current directory as a string rather than a file descriptor because
pledge doesn't let us pass directory file descriptors.

Revision 1.562 / (download) - annotate - [select for diffs], Fri Sep 25 15:53:07 2015 UTC (8 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.561: +2 -1 lines
Diff to previous 1.561 (colored)

Free the history when it is cleared, based on a diff from Carlo Cannas.

Revision 1.561 / (download) - annotate - [select for diffs], Wed Sep 16 22:24:54 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.560: +3 -2 lines
Diff to previous 1.560 (colored)

Rename cmd_q dead flag to a general flags bitmask (will be more flags later).

Revision 1.560 / (download) - annotate - [select for diffs], Mon Sep 14 11:57:22 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.559: +2 -2 lines
Diff to previous 1.559 (colored)

Style nit, int for flags not u_int.

Revision 1.559 / (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.558: +5 -1 lines
Diff to previous 1.558 (colored)

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

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

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

Revision 1.557 / (download) - annotate - [select for diffs], Sun Sep 13 13:31:40 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.556: +2 -2 lines
Diff to previous 1.556 (colored)

Add copy-mode -e to exit copy mode when scrolling off the bottom, useful
for quick view of history, from Cam Hutchison.

Revision 1.556 / (download) - annotate - [select for diffs], Fri Sep 11 14:41:50 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.555: +2 -3 lines
Diff to previous 1.555 (colored)

Merge delete-buffer into cmd-set-buffer.c and change the paste buffer
API so it has one paste_free() rather than free_top and free_name
(everywhere that uses it already has the right pointer).

Revision 1.555 / (download) - annotate - [select for diffs], Thu Sep 10 08:58:14 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.554: +2 -1 lines
Diff to previous 1.554 (colored)

Add session_last_attached time and format, from Sina Siadat.

Revision 1.554 / (download) - annotate - [select for diffs], Wed Sep 2 17:43:25 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.553: +1 -2 lines
Diff to previous 1.553 (colored)

A one line helper function is a little silly.

Revision 1.553 / (download) - annotate - [select for diffs], Wed Sep 2 17:37:54 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.552: +1 -4 lines
Diff to previous 1.552 (colored)

We no longer need the terminal service class, so don't bother asking for it.

Revision 1.552 / (download) - annotate - [select for diffs], Tue Sep 1 11:13:39 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.551: +1 -2 lines
Diff to previous 1.551 (colored)

Remove dead_clients which is no longer used.

Revision 1.551 / (download) - annotate - [select for diffs], Tue Sep 1 10:10:59 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.550: +2 -2 lines
Diff to previous 1.550 (colored)

Work out config file when needed not at startup.

Revision 1.550 / (download) - annotate - [select for diffs], Tue Sep 1 10:01:56 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.549: +2 -3 lines
Diff to previous 1.549 (colored)

Move initial conf load into cfg.c.

Revision 1.549 / (download) - annotate - [select for diffs], Tue Sep 1 09:48:34 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.548: +1 -87 lines
Diff to previous 1.548 (colored)

All the cmd_*_entry declarations do not need to be in tmux.h.

Revision 1.548 / (download) - annotate - [select for diffs], Sun Aug 30 22:56:36 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.547: +1 -2 lines
Diff to previous 1.547 (colored)

Path from $TMUX does not need to be global anymore.

Revision 1.547 / (download) - annotate - [select for diffs], Sun Aug 30 22:40:25 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.546: +2 -4 lines
Diff to previous 1.546 (colored)

Login shell can be a client flag, and move the exec code into client.c.

Revision 1.546 / (download) - annotate - [select for diffs], Sun Aug 30 22:19:07 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.545: +3 -4 lines
Diff to previous 1.545 (colored)

Event base does not need to be global.

Revision 1.545 / (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.544: +1 -7 lines
Diff to previous 1.544 (colored)

Remove some old prototypes and unused functions.

Revision 1.544 / (download) - annotate - [select for diffs], Sat Aug 29 23:19:52 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.543: +2 -7 lines
Diff to previous 1.543 (colored)

struct args_entry can go into arguments.c.

Revision 1.543 / (download) - annotate - [select for diffs], Sat Aug 29 09:36:46 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.542: +1 -3 lines
Diff to previous 1.542 (colored)

paste_send_pane can be merged into cmd-paste-buffer.c now.

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

Move struct paste_buffer out of tmux.h.

Revision 1.541 / (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.540: +8 -5 lines
Diff to previous 1.540 (colored)

Move alerts onto events rather than checking every loop.

Revision 1.540 / (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.539: +8 -5 lines
Diff to previous 1.539 (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.539 / (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.538: +2 -1 lines
Diff to previous 1.538 (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.538 / (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.537: +2 -3 lines
Diff to previous 1.537 (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.537 / (download) - annotate - [select for diffs], Fri Aug 28 13:12:20 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.536: +3 -1 lines
Diff to previous 1.536 (colored)

Per-session timers for locking, and remove the global one-second timer.

Revision 1.536 / (download) - annotate - [select for diffs], Fri Aug 28 13:01:03 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.535: +2 -2 lines
Diff to previous 1.535 (colored)

Make session_update_activity more useful and use it in more places.

Revision 1.535 / (download) - annotate - [select for diffs], Fri Aug 28 12:25:42 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.534: +1 -2 lines
Diff to previous 1.534 (colored)

Give clock mode its own timer.

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

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

Revision 1.533 / (download) - annotate - [select for diffs], Fri Aug 28 11:38:27 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.532: +1 -2 lines
Diff to previous 1.532 (colored)

Move format job cleanup onto its own timer.

Revision 1.532 / (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.531: +2 -1 lines
Diff to previous 1.531 (colored)

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

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

status_out and associated data structures are no longer used.

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

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

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

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

Revision 1.528 / (download) - annotate - [select for diffs], Mon Jul 13 15:51:31 2015 UTC (8 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.527: +2 -2 lines
Diff to previous 1.527 (colored)

Fix line endings.

Revision 1.527 / (download) - annotate - [select for diffs], Mon Jul 13 15:49:31 2015 UTC (8 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.526: +2 -2 lines
Diff to previous 1.526 (colored)

Initialize cwd fd to -1 so that we don't close fd 0 if the client is
destroyed before it is changed. Also allow ttyname() to fail. Fixes
problems when running out of file descriptors reported by Bruno Sutic.

Revision 1.526 / (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.525: +2 -1 lines
Diff to previous 1.525 (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.525 / (download) - annotate - [select for diffs], Wed Jun 17 16:44:49 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.524: +7 -1 lines
Diff to previous 1.524 (colored)

Use an explicit job state instead of avoid closing our side of the
socketpair and setting it to -1 to mark when the other side is
closed. This avoids closing it while the libevent bufferevent still has
it (it could try to add it to the polled set which some mechanisms don't
like). Fixes part a problem reported by Bruno Sutic.

Revision 1.524 / (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.523: +2 -1 lines
Diff to previous 1.523 (colored)

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

Revision 1.523 / (download) - annotate - [select for diffs], Sun Jun 14 10:07:44 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.522: +3 -1 lines
Diff to previous 1.522 (colored)

Add a format for client PID (client_pid) and server PID (pid). Diff for
client_pid from Thomas Adam.

Revision 1.522 / (download) - annotate - [select for diffs], Sun Jun 7 21:39:39 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.521: +2 -2 lines
Diff to previous 1.521 (colored)

Add -E flag when attaching or switching client to bypass
update-environment, from Steven Lu.

Revision 1.521 / (download) - annotate - [select for diffs], Fri Jun 5 22:33:39 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.520: +2 -1 lines
Diff to previous 1.520 (colored)

Handle the RGB colour escape sequence (\033[38;2;<r>;<g>;<b>m and 48;2)
like xterm(1) does, by mapping to the nearest in the 256 colour palette.

Revision 1.520 / (download) - annotate - [select for diffs], Fri Jun 5 18:18:32 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.519: +2 -2 lines
Diff to previous 1.519 (colored)

Similarly, for sessions use a callback to free rather than checking
every loop.

Revision 1.519 / (download) - annotate - [select for diffs], Fri Jun 5 18:06:30 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.518: +2 -2 lines
Diff to previous 1.518 (colored)

Change deref to the more sensible unref, and add a couple I missed before.

Revision 1.518 / (download) - annotate - [select for diffs], Fri Jun 5 18:01:12 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.517: +2 -1 lines
Diff to previous 1.517 (colored)

Instead of putting dead clients on a list and checking it every loop,
use event_once to queue a callback to deal with them. Also dead clients
with references would never actually be freed because the wrap-up
functions (the callback for stdin, or status_prompt_clear) would never
be called. So call them in server_client_lost.

Revision 1.517 / (download) - annotate - [select for diffs], Thu Jun 4 23:27:51 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.516: +3 -3 lines
Diff to previous 1.516 (colored)

Move the nested check from client to server and compare the client tty
name to all the pane pty names instead of comparing socket paths. This
means that "new -d" will work without unsetting $TMUX.

Revision 1.516 / (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.515: +14 -1 lines
Diff to previous 1.515 (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.515 / (download) - annotate - [select for diffs], Wed May 27 13:28:04 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.514: +3 -1 lines
Diff to previous 1.514 (colored)

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

Revision 1.514 / (download) - annotate - [select for diffs], Tue May 12 22:40:38 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.513: +15 -3 lines
Diff to previous 1.513 (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.513 / (download) - annotate - [select for diffs], Tue May 12 15:27:46 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.512: +2 -1 lines
Diff to previous 1.512 (colored)

Add bell-action "other" to pass through bells in all windows except the
current, suggested by Jan ONDREJ.

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

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

Revision 1.511 / (download) - annotate - [select for diffs], Fri May 8 16:48:12 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.510: +49 -49 lines
Diff to previous 1.510 (colored)

Put the tty structs together, and tabify.

Revision 1.510 / (download) - annotate - [select for diffs], Fri May 8 16:44:03 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.509: +1 -2 lines
Diff to previous 1.509 (colored)

grid_marker_cell is no longer used.

Revision 1.509 / (download) - annotate - [select for diffs], Fri May 8 16:33:29 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.508: +9 -20 lines
Diff to previous 1.508 (colored)

mode_key_entry can go into mode-key.c; also a few spaces->tabs.

Revision 1.508 / (download) - annotate - [select for diffs], Fri May 8 16:23:34 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.507: +1 -9 lines
Diff to previous 1.507 (colored)

window_choose_mode_item can move into window-choose.c.

Revision 1.507 / (download) - annotate - [select for diffs], Fri May 8 16:18:04 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.506: +5 -51 lines
Diff to previous 1.506 (colored)

Move input parser structs into input.c (removing fairly useless
saved_cursor_[xy] formats as a side-effect).

Revision 1.506 / (download) - annotate - [select for diffs], Thu May 7 08:08:54 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.505: +1 -3 lines
Diff to previous 1.505 (colored)

array.h can be local to window-choose.c now.

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

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

Revision 1.504 / (download) - annotate - [select for diffs], Wed May 6 08:35:39 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.503: +2 -1 lines
Diff to previous 1.503 (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.503 / (download) - annotate - [select for diffs], Tue Apr 28 10:43:14 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.502: +2 -1 lines
Diff to previous 1.502 (colored)

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

Revision 1.502 / (download) - annotate - [select for diffs], Mon Apr 27 16:25:57 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.501: +14 -13 lines
Diff to previous 1.501 (colored)

Rewrite of the target resolution internals to be simpler and more
consistent but with much less duplication, but keeping the same internal
API. Also adds more readable aliases for some of the special tokens used
in targets (eg "{start}" instead of "^"). Some behaviours may have
changed, for example prefix matches now happen before fnmatch.

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

Make message log a TAILQ.

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

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

Revision 1.499 / (download) - annotate - [select for diffs], Fri Apr 24 23:17:11 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.498: +4 -2 lines
Diff to previous 1.498 (colored)

Convert clients list into a TAILQ.

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

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

Revision 1.497 / (download) - annotate - [select for diffs], Wed Apr 22 15:32:33 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.496: +2 -2 lines
Diff to previous 1.496 (colored)

Make session_has return a flag, returning the first winlink found is a
recipe for errors.

Revision 1.496 / (download) - annotate - [select for diffs], Wed Apr 22 15:30:11 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.495: +6 -2 lines
Diff to previous 1.495 (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.495 / (download) - annotate - [select for diffs], Wed Apr 22 15:05:03 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.494: +1 -2 lines
Diff to previous 1.494 (colored)

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

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

Always format real layout even when zoomed.

Revision 1.493 / (download) - annotate - [select for diffs], Mon Apr 20 15:34:56 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.492: +27 -14 lines
Diff to previous 1.492 (colored)

Support for multiple key tables to commands to be bound to sequences of
keys. The default key bindings become the "prefix" table and -n the
"root" table. Keys may be bound in new tables with bind -T and
switch-client -T used to specify the table in which the next key should
be looked up. Based on a diff from Keith Amling.

Revision 1.492 / (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.491: +82 -62 lines
Diff to previous 1.491 (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.491 / (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.490: +10 -3 lines
Diff to previous 1.490 (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.490 / (download) - annotate - [select for diffs], Fri Feb 6 17:21:08 2015 UTC (9 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.489: +1 -3 lines
Diff to previous 1.489 (colored)

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

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

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

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

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

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

There is no need to save the guard state because the function checks it
again anyway.

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

Remove two unused arguments from status_replace.

Revision 1.485 / (download) - annotate - [select for diffs], Tue Jan 20 08:18:04 2015 UTC (9 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.484: +3 -2 lines
Diff to previous 1.484 (colored)

Support blinking cursor mode, both the xterm CSI ?12 h/l and (the
backwards) screen CSI 34 h/l. From Guanpeng Xu.

Revision 1.484 / (download) - annotate - [select for diffs], Tue Dec 9 19:23:35 2014 UTC (9 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.483: +2 -1 lines
Diff to previous 1.483 (colored)

Add pane_dead_status for exit status of dead panes.

Revision 1.483 / (download) - annotate - [select for diffs], Tue Dec 2 23:19:45 2014 UTC (9 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.482: +2 -12 lines
Diff to previous 1.482 (colored)

Permit option values to be used in formats.

Revision 1.482 / (download) - annotate - [select for diffs], Sun Nov 30 08:03:29 2014 UTC (9 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.481: +1 -4 lines
Diff to previous 1.481 (colored)

Remove dead code, from Thomas Adam.

Revision 1.481 / (download) - annotate - [select for diffs], Fri Nov 14 02:19:47 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.480: +4 -2 lines
Diff to previous 1.480 (colored)

Label windows which are smaller than expected with a reason.

Revision 1.480 / (download) - annotate - [select for diffs], Thu Nov 6 09:17:26 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.479: +7 -1 lines
Diff to previous 1.479 (colored)

Add V for select line with vi(1) keys. From Juho Pohjala.

Revision 1.479 / (download) - annotate - [select for diffs], Mon Oct 27 22:23:47 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.478: +3 -5 lines
Diff to previous 1.478 (colored)

Move cfg_causes local into cfg.c and remove struct causelist.

Revision 1.478 / (download) - annotate - [select for diffs], Wed Oct 22 23:11:41 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.477: +2 -1 lines
Diff to previous 1.477 (colored)

Merge unlink-window into kill-window.

Revision 1.477 / (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.476: +2 -2 lines
Diff to previous 1.476 (colored)

Only redraw pane when it has actually changed.

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

Better format for printf format attributes.

Revision 1.475 / (download) - annotate - [select for diffs], Mon Oct 20 23:35:28 2014 UTC (9 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.474: +1 -73 lines
Diff to previous 1.474 (colored)

Move template defines back into .c files.

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

Tidy up some includes.

Revision 1.473 / (download) - annotate - [select for diffs], Mon Oct 20 22:29:25 2014 UTC (9 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.472: +1 -2 lines
Diff to previous 1.472 (colored)

Instead of setting up the default keys by building the key struct
directly with a helper function in the cmd_entry, include a table of
bind-key commands and pass them through the command parser and a
temporary cmd_q.

As well as being smaller, this will allow default bindings to be command
sequences which will probably be needed soon.

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

Add xreallocarray and remove nmemb argument from xrealloc.

Revision 1.471 / (download) - annotate - [select for diffs], Mon Sep 1 21:58:41 2014 UTC (9 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.470: +4 -1 lines
Diff to previous 1.470 (colored)

Wake up any clients waiting with the wait-for command when the server
exits.

Revision 1.470 / (download) - annotate - [select for diffs], Mon Sep 1 21:50:18 2014 UTC (9 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.469: +2 -2 lines
Diff to previous 1.469 (colored)

Various minor style and spacing nits.

Revision 1.469 / (download) - annotate - [select for diffs], Mon Aug 11 22:18:16 2014 UTC (9 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.468: +2 -1 lines
Diff to previous 1.468 (colored)

Fix two copy mode problems:

1. In vi mode the selection doesn't include the last character if you
   moved the cursor up or left.
2. In emacs mode the selection includes the last character if you moved
   the cursor to the left.

From Balazs Kezes.

Revision 1.468 / (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.467: +2 -1 lines
Diff to previous 1.467 (colored)

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

Revision 1.467 / (download) - annotate - [select for diffs], Sat Aug 9 07:33:37 2014 UTC (9 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.466: +3 -3 lines
Diff to previous 1.466 (colored)

Remove support for the continuous reporting "any" mouse mode which never
really worked properly and is rarely used.

Revision 1.466 / (download) - annotate - [select for diffs], Mon Jul 21 10:25:48 2014 UTC (9 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.465: +64 -29 lines
Diff to previous 1.465 (colored)

Drop explicit support for F13-F20 and change to match the xterm terminfo
entry:

        F13-F24 are S-F1 to S-F12
        F25-F36 are C-F1 to C-F12
        F37-F48 are C-S-F1 to C-S-F12
        F49-F60 are M-F1 to M-F12
and     F61-F63 are M-S-F1 to M-S-F3

This should be no difference for applications inside tmux, but means
that any key binding for F13 will need to be replaced by S-F1 and so on.

Revision 1.465 / (download) - annotate - [select for diffs], Fri Jun 6 13:21:41 2014 UTC (9 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.464: +12 -4 lines
Diff to previous 1.464 (colored)

Properly track switching G0 and G1 modes between US-ASCII and VT100 line
drawing rather than just treating them as SO and SI.

Revision 1.464 / (download) - annotate - [select for diffs], Wed May 14 06:21:19 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.463: +1 -2 lines
Diff to previous 1.463 (colored)

Now that cmdlists are reference counted, there is no need for two-step
deletion via the dead_key_bindings tree. From Keith Amling.

Revision 1.463 / (download) - annotate - [select for diffs], Tue May 13 08:08:32 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.462: +12 -10 lines
Diff to previous 1.462 (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.462 / (download) - annotate - [select for diffs], Tue May 13 07:54:20 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.461: +2 -1 lines
Diff to previous 1.461 (colored)

Add a copy mode key binding to copy to a named buffer. From J Raynor.

Revision 1.461 / (download) - annotate - [select for diffs], Tue May 13 07:34:35 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.460: +18 -9 lines
Diff to previous 1.460 (colored)

Add support for named buffers. If you don't name a buffer, things work
much as before - buffers are automatically named "buffer0000",
"buffer0001" and so on and ordered as a stack. Buffers can be named
explicitly when creating ("loadb -b foo" etc) or renamed ("setb -b
buffer0000 -n foo"). If buffers are named explicitly, they are not
deleted when buffer-limit is reached. Diff from J Raynor.

Revision 1.460 / (download) - annotate - [select for diffs], Fri May 9 09:11:24 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.459: +2 -2 lines
Diff to previous 1.459 (colored)

Just use char ** for argv like normal people, not char *const *.

Revision 1.459 / (download) - annotate - [select for diffs], Thu May 8 07:54:47 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.458: +4 -1 lines
Diff to previous 1.458 (colored)

Instead of forcing mouse scroll to 1 in choose mode, scale it down
instead. Means modifier keys still increase the line count, just not as
much. Based on a diff from Marcel Partap.

Revision 1.458 / (download) - annotate - [select for diffs], Thu May 8 06:03:30 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.457: +3 -3 lines
Diff to previous 1.457 (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.457 / (download) - annotate - [select for diffs], Thu Apr 24 09:14:43 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.456: +8 -10 lines
Diff to previous 1.456 (colored)

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

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

Add some UTF-8 utility functions and use them to prevent the width limit
on formats from splitting UTF-8 characters improperly.

Revision 1.455 / (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.454: +9 -9 lines
Diff to previous 1.454 (colored)

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

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

Don't limit the DCS buffer to 256 bytes, expand it as needed. Requested
by Suraj Kurapati.

Revision 1.453 / (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.452: +2 -1 lines
Diff to previous 1.452 (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.452 / (download) - annotate - [select for diffs], Thu Apr 17 07:55:43 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.451: +1 -2 lines
Diff to previous 1.451 (colored)

Remove the "info" message mechanism, this was only used for about five
mostly useless and annoying messages. Change those commands to silence
on success like all the others. Still accept the -q command line flag
and "quiet" server option for now.

Revision 1.451 / (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.450: +3 -5 lines
Diff to previous 1.450 (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.450 / (download) - annotate - [select for diffs], Wed Apr 16 21:16:19 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.449: +5 -4 lines
Diff to previous 1.449 (colored)

Remove a leftover prototype and fix some spacing.

Revision 1.449 / (download) - annotate - [select for diffs], Wed Apr 16 21:02:41 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.448: +1 -2 lines
Diff to previous 1.448 (colored)

Remove the choose-list command to prepare for some later choose-* work.

Revision 1.448 / (download) - annotate - [select for diffs], Thu Apr 3 08:20:29 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.447: +2 -1 lines
Diff to previous 1.447 (colored)

Work out mouse scroll wheel effect when the mouse is first detected and
store it in struct mouse_event, reduce the scroll size the 3 but allow
shift to reduce it to 1 and meta and ctrl to multiply by 3 if the
terminal supports them, also support wheel in choose mode. From Marcel
Partap.

Revision 1.447 / (download) - annotate - [select for diffs], Wed Apr 2 18:12:18 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.446: +5 -4 lines
Diff to previous 1.446 (colored)

Support UTF-8 with choose-buffer, from Kosuke ASAMI. Also make
buffer_sample bigger to let it trim at window right edge.

Revision 1.446 / (download) - annotate - [select for diffs], Tue Apr 1 05:50:30 2014 UTC (10 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.445: +2 -2 lines
Diff to previous 1.445 (colored)

missed commit matching log.c

Revision 1.445 / (download) - annotate - [select for diffs], Mon Mar 31 21:42:27 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.444: +1 -11 lines
Diff to previous 1.444 (colored)

GRID_DEBUG is no longer needed.

Revision 1.444 / (download) - annotate - [select for diffs], Mon Mar 31 21:42:05 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.443: +1 -4 lines
Diff to previous 1.443 (colored)

Remove unused log functions.

Revision 1.443 / (download) - annotate - [select for diffs], Mon Mar 31 21:40:21 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.442: +11 -3 lines
Diff to previous 1.442 (colored)

Add names for mouse button bits rather than using magic numbers, from
Marcel Partap.

Revision 1.442 / (download) - annotate - [select for diffs], Mon Mar 31 21:39:59 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.441: +7 -7 lines
Diff to previous 1.441 (colored)

Use hex constants rather than shifts for mouse events and flags, pointed
out by Marcel Partap.

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

Add setb -a to append and a copy mode append command, from J Raynor with
minor changes.

Revision 1.440 / (download) - annotate - [select for diffs], Mon Mar 31 21:37:55 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.439: +3 -1 lines
Diff to previous 1.439 (colored)

Make session_attached a count and add session_many_attached flag.

Revision 1.439 / (download) - annotate - [select for diffs], Mon Mar 31 21:36:43 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.438: +5 -1 lines
Diff to previous 1.438 (colored)

Add start-of-list, end-of-list, top-line and bottom-line in choice mode,
from madmaverick9 at roxxmail dot eu, similar diff a few days later from
Marcel Partap.

Revision 1.438 / (download) - annotate - [select for diffs], Mon Mar 31 21:34:08 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.437: +2 -5 lines
Diff to previous 1.437 (colored)

Having three *clock* files is ridiculous, remove clock.c.

Revision 1.437 / (download) - annotate - [select for diffs], Sun Feb 23 00:53:06 2014 UTC (10 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.436: +4 -4 lines
Diff to previous 1.436 (colored)

Change terminal-overrides to a server option (now that we have them), it
doesn't make much sense as a session option.

Revision 1.436 / (download) - annotate - [select for diffs], Fri Jan 31 14:19:24 2014 UTC (10 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.435: +2 -2 lines
Diff to previous 1.435 (colored)

Break up and simplify screen_redraw_screen.

Revision 1.435 / (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.434: +26 -12 lines
Diff to previous 1.434 (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.434 / (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.433: +3 -1 lines
Diff to previous 1.433 (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.433 / (download) - annotate - [select for diffs], Thu Jan 9 14:20:55 2014 UTC (10 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.432: +3 -1 lines
Diff to previous 1.432 (colored)

Allow attach-session -t to accept a window and pane to select them on
attach. Based on a diff from J Raynor.

Revision 1.432 / (download) - annotate - [select for diffs], Wed Oct 23 11:31:03 2013 UTC (10 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.431: +2 -1 lines
Diff to previous 1.431 (colored)

Key to swap to other end of selection (bound to o with vi keys), from J
Raynor.

Revision 1.431 / (download) - annotate - [select for diffs], Sun Oct 20 17:28:43 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.430: +2 -1 lines
Diff to previous 1.430 (colored)

Do not run any command line command from the client which starts the
server until after the configuration file completes. This prevents it
racing against run-shell or if-shell in .tmux.conf that run in the
background.

Revision 1.430 / (download) - annotate - [select for diffs], Thu Oct 10 12:39:25 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.429: +1 -2 lines
Diff to previous 1.429 (colored)

Remove the KERN_PROC_CWD the proc_current_path format (which is the only
thing that uses it now).

Revision 1.429 / (download) - annotate - [select for diffs], Thu Oct 10 12:29:35 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.428: +1 -8 lines
Diff to previous 1.428 (colored)

We accidentally haven't been using $TMUX to work out the session for a
while and in fact it is less useful that using the client ttyname. So
don't bother and don't pass it from the client. If we need it in future
it is in c->environ.

Revision 1.428 / (download) - annotate - [select for diffs], Thu Oct 10 12:26:36 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.427: +17 -37 lines
Diff to previous 1.427 (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.427 / (download) - annotate - [select for diffs], Thu Oct 10 12:13:56 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.426: +10 -13 lines
Diff to previous 1.426 (colored)

Similarly for MSG_COMMAND - allow full imsg limit not arbitrary 2048.

Revision 1.426 / (download) - annotate - [select for diffs], Thu Oct 10 12:13:29 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.425: +1 -13 lines
Diff to previous 1.425 (colored)

Instead of fixed size buffers for some messages, send only the string
length.

Revision 1.425 / (download) - annotate - [select for diffs], Thu Oct 10 12:12:54 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.424: +3 -2 lines
Diff to previous 1.424 (colored)

retcode -> retval for exit message.

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

Merge IDENTIFY_* flags with CLIENT_* flags.

Revision 1.423 / (download) - annotate - [select for diffs], Thu Oct 10 12:11:45 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.422: +23 -14 lines
Diff to previous 1.422 (colored)

Bump protocol version and add new message types.

Revision 1.422 / (download) - annotate - [select for diffs], Thu Oct 10 12:09:34 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.421: +2 -3 lines
Diff to previous 1.421 (colored)

Remove CMD_SENDENVIRON.

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

Support -c for new-session, based on code from J Raynor.

Revision 1.420 / (download) - annotate - [select for diffs], Thu Oct 10 12:02:24 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.419: +2 -2 lines
Diff to previous 1.419 (colored)

No space in lsw -a targets.

Revision 1.419 / (download) - annotate - [select for diffs], Thu Oct 10 12:00:24 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.418: +1 -2 lines
Diff to previous 1.418 (colored)

Remove the barely-used and unnecessary command check() function.

Revision 1.418 / (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.417: +2 -1 lines
Diff to previous 1.417 (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.417 / (download) - annotate - [select for diffs], Thu Oct 10 11:56:50 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.416: +14 -9 lines
Diff to previous 1.416 (colored)

Add automatic-rename-format option allowing automatic rename to use
something other than pane_current_command.

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

Pass flags into cmdq_guard as an argument since sometimes cmdq->cmd can
be NULL. Avoids crash when a command in a command client can't be
parsed.

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

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

Revision 1.414 / (download) - annotate - [select for diffs], Sun Jun 23 13:10:48 2013 UTC (10 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.413: +2 -1 lines
Diff to previous 1.413 (colored)

Focus events can cause trouble if left on and they can't be turned off
during idle periods (like the other states are) because we'd miss
events. So add a server option to control them. Defaults to off.

Revision 1.413 / (download) - annotate - [select for diffs], Sun Jun 23 12:51:29 2013 UTC (10 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.412: +2 -1 lines
Diff to previous 1.412 (colored)

Always push a focus event when the application turns it on, prompted by
discussion with Hayaki Saito a while ago.

Revision 1.412 / (download) - annotate - [select for diffs], Sun Jun 23 12:41:55 2013 UTC (10 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.411: +4 -1 lines
Diff to previous 1.411 (colored)

Mark control commands specially so the client can identify them, based
on a diff from George Nachman a while back.

Revision 1.411 / (download) - annotate - [select for diffs], Sun Jun 2 07:52:15 2013 UTC (10 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.410: +4 -4 lines
Diff to previous 1.410 (colored)

The actual terminfo entries we ended up with for cursor changes are Cs,
Ce, Ss and Se (not Cc, Ce, Cs, Csr). So use and document these instead
of the ones we were using earlier.

Revision 1.410 / (download) - annotate - [select for diffs], Fri May 31 12:19:34 2013 UTC (10 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.409: +14 -7 lines
Diff to previous 1.409 (colored)

Instead of eating 1024 bytes or so for the arguments of each command,
save memory by using an RB tree. From Tiago Cunha.

Revision 1.409 / (download) - annotate - [select for diffs], Wed Apr 24 10:01:32 2013 UTC (11 years ago) by nicm
Branch: MAIN
Changes since 1.408: +3 -4 lines
Diff to previous 1.408 (colored)

Rename global configuration define.

Revision 1.408 / (download) - annotate - [select for diffs], Mon Apr 22 22:17:29 2013 UTC (11 years ago) by nicm
Branch: MAIN
Changes since 1.407: +3 -1 lines
Diff to previous 1.407 (colored)

When using choose-tree -u, start with the current window
highlighted. From Thomas Adam.

Revision 1.407 / (download) - annotate - [select for diffs], Wed Mar 27 11:17:12 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.406: +3 -5 lines
Diff to previous 1.406 (colored)

Remove tmux's (already minimal) 88 colour support. Such terminals are
few and unnecessary.

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

Add -P and -F to new-session.

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

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

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

Only send end guard if begin was sent, from George Nachman.

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

Add time and a command count to control mode guards, based on code from
George Nachman.

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

Rename session idx to session id throughout and add $ prefix to targets
to use it, extended from a diff from George Nachman.

Revision 1.401 / (download) - annotate - [select for diffs], Mon Mar 25 10:09:07 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.400: +4 -1 lines
Diff to previous 1.400 (colored)

Add a wait-for command which blocks a client on a named channel until it
is woken up again (with wait-for -S). From Thiago Padilha.

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

Preserve trailing spaces with capture-pane -J, from George Nachman.

Revision 1.399 / (download) - annotate - [select for diffs], Sun Mar 24 09:58:40 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.398: +4 -1 lines
Diff to previous 1.398 (colored)

Add -A flag to new-session to make it behave like attach-session if the
session exists. If -A is used, -D behaves like -d to attach-session.

Revision 1.398 / (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.397: +9 -2 lines
Diff to previous 1.397 (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.397 / (download) - annotate - [select for diffs], Sun Mar 24 09:54:10 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.396: +74 -64 lines
Diff to previous 1.396 (colored)

Add a command queue to standardize and simplify commands that call other
commands and allow a command to block execution of subsequent
commands. This allows run-shell and if-shell to be synchronous which has
been much requested.

Each client has a default command queue and commands are consumed one at
a time from it. A command may suspend execution from the queue by
returning CMD_RETURN_WAIT and then resume it by calling cmd_continue() -
for example run-shell does this from the callback that is fired after
the job is freed.

When the command queue becomes empty, command clients are automatically
exited (unless attaching). A callback is also fired - this is used for
nested commands in, for example, if-shell which can block execution of
the client's cmdq until a new cmdq becomes empty.

Also merge all the old error/info/print functions together and lose the
old curclient/cmdclient distinction - a cmdq is bound to one client (or
none if in the configuration file), this is a command client if
c->session is NULL otherwise an attached client.

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

Handle focus events from the terminal, from Aaron Jensen.

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

Fix error reporting for client commands by adding a flag to
cmd_find_client to tell it whether or not to show errors, sometimes it's
needed and sometimes not.

Revision 1.394 / (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.393: +2 -1 lines
Diff to previous 1.393 (colored)

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

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

Add support for focus notifications when tmux pane changes, based on
work by Aaron Jensen.

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

Add session_set_current helper function, extracted from a diff from
Aaron Jensen.

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

Add -C and -J to capture pane to escape control sequences and to join
wrapped line, based on a diff from George Nachman.

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

Need to set clients in context before changing their reference count.

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

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

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

Add -e flag to capture-pane to include embedded ANSI SGR escape
sequences, from George Nachman.

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

Add functions to allocate and free command contexts rather than doing it
all on the stack.

Revision 1.386 / (download) - annotate - [select for diffs], Fri Mar 22 10:38:13 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.385: +2 -2 lines
Diff to previous 1.385 (colored)

Fix double space in sessions template.

Revision 1.385 / (download) - annotate - [select for diffs], Fri Mar 22 10:37:39 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.384: +7 -5 lines
Diff to previous 1.384 (colored)

Add resize-pane -x and -y for absolute pane size (much requested).

Revision 1.384 / (download) - annotate - [select for diffs], Fri Mar 22 10:33:50 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.383: +10 -2 lines
Diff to previous 1.383 (colored)

Support the latest theory for mouse input, this is enabled/disabled with
SM/RM 1006 and is similar in style to SGR input: \033[<b;x;yM or
\033[b;x;ym. From Egmont Koblinger.

Revision 1.383 / (download) - annotate - [select for diffs], Thu Mar 21 18:47:56 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.382: +3 -9 lines
Diff to previous 1.382 (colored)

Instead of loads of little screen_write_*_on and off functions which
just change mode flags, just have screen_write_mode_set and
screen_write_mode_clear.

Revision 1.382 / (download) - annotate - [select for diffs], Thu Mar 21 18:44:47 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.381: +2 -2 lines
Diff to previous 1.381 (colored)

Include the \033 in the key tree and adjust key matching for this change.

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

Tidy by splitting default key tables into two.

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

Fix constness of cmd_template_replace, window_choose_add_item and
window_choose_add_window.

Revision 1.379 / (download) - annotate - [select for diffs], Thu Mar 21 16:15:52 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.378: +6 -7 lines
Diff to previous 1.378 (colored)

Add -v to set and setw to show only option value.

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

Rework reflow code so it does not do so much allocation which should be
faster with large histories.

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

Allow choose commands to be used outside tmux, so long as at least one
client is attached.

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

Remove free callback for window_choose_data objects.

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

Miscellaneous tidying of choose API, including:

- rename client and session to start_client and start_session in
  window_choose_data struct. also add TREE_OTHER define and reorder
  the struct
- rename window_choose_ctx to window_choose_data_run
- don't pass a cmd_ctx into window_choose_create (will let it use a
  different client later). instead take type, session, client
- add window_choose_data_free and use it to dispose of wcd rather than
  each cmd-*.c doing it individually
- change so ref counting is done by wcd_add and wcd_free rather than
  callers
- also add a ref to tree_session
- all the callbacks except choose-client and find-window are the same so
  remove them and add window_choose_default_callback
- reorder/rename some other bits and pieces for tidyness

Revision 1.374 / (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.373: +4 -2 lines
Diff to previous 1.373 (colored)

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

Revision 1.373 / (download) - annotate - [select for diffs], Fri Jan 18 02:16:21 2013 UTC (11 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.372: +13 -38 lines
Diff to previous 1.372 (colored)

Rather than having two grids for each pane, one for ASCII and one for
UTF-8, collapse the two together. Simplifies the code at the expense of
more memory (which can probably be reduced again later).

Revision 1.372 / (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.371: +2 -16 lines
Diff to previous 1.371 (colored)

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

Revision 1.371 / (download) - annotate - [select for diffs], Tue Jan 15 23:18:55 2013 UTC (11 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.370: +4 -1 lines
Diff to previous 1.370 (colored)

Implement ECH (erase character, CSI X). Reported by Christian Neukirchen.

Revision 1.370 / (download) - annotate - [select for diffs], Tue Jan 15 22:55:29 2013 UTC (11 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.369: +2 -2 lines
Diff to previous 1.369 (colored)

If timing between keys is less than (by default) 1 millisecond, assume
the text is being pasted. assume-paste-time option changes the value (0
disables). Based on a diff from Marcin Kulik.

Revision 1.369 / (download) - annotate - [select for diffs], Mon Dec 24 12:33:05 2012 UTC (11 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.368: +2 -1 lines
Diff to previous 1.368 (colored)

Add missing function prototype.

Revision 1.368 / (download) - annotate - [select for diffs], Tue Nov 27 22:59:34 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.367: +2 -2 lines
Diff to previous 1.367 (colored)

Fix return value of load_cfg, from Thomas Adam.

Revision 1.367 / (download) - annotate - [select for diffs], Tue Nov 27 20:22:12 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.366: +7 -4 lines
Diff to previous 1.366 (colored)

Support middle-click paste, based on a diff from Ailin Nemui.

Revision 1.366 / (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.365: +5 -5 lines
Diff to previous 1.365 (colored)

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

Revision 1.365 / (download) - annotate - [select for diffs], Tue Nov 27 16:12:29 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.364: +2 -1 lines
Diff to previous 1.364 (colored)

Correctly aggregate together errors from nested config files (with
source-file). Fix by Thomas Adam, reported by Sam Livingstone-Gray

Revision 1.364 / (download) - annotate - [select for diffs], Thu Nov 22 14:41:11 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.363: +3 -2 lines
Diff to previous 1.363 (colored)

Put helper function back, will be needed in a bit.

Revision 1.363 / (download) - annotate - [select for diffs], Thu Nov 22 14:26:04 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.362: +2 -3 lines
Diff to previous 1.362 (colored)

Instead of worrying about xterm version, send DA and read DEC service
class which is more likely to be useful. Not used for anything yet
anyway.

Revision 1.362 / (download) - annotate - [select for diffs], Mon Nov 19 10:38:06 2012 UTC (11 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.361: +2 -1 lines
Diff to previous 1.361 (colored)

Use a utility function for common code to show errors in config file,
from Thomas Adam.

Revision 1.361 / (download) - annotate - [select for diffs], Mon Nov 5 13:13:04 2012 UTC (11 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.360: +3 -2 lines
Diff to previous 1.360 (colored)

Show last client activity time in default choose-client list.

Revision 1.360 / (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.359: +45 -29 lines
Diff to previous 1.359 (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.359 / (download) - annotate - [select for diffs], Tue Oct 2 08:16:28 2012 UTC (11 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.358: +13 -2 lines
Diff to previous 1.358 (colored)

Allow session tree (C-b s) to expand and collapse sessions with
left/right/space keys. From Thomas Adam.

Revision 1.358 / (download) - annotate - [select for diffs], Tue Sep 25 07:41:22 2012 UTC (11 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.357: +4 -1 lines
Diff to previous 1.357 (colored)

Add notification for input from a pane, from George Nachman.

Revision 1.357 / (download) - annotate - [select for diffs], Mon Sep 24 13:39:10 2012 UTC (11 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.356: +2 -1 lines
Diff to previous 1.356 (colored)

Add control_write_buffer, from George Nachman.

Revision 1.356 / (download) - annotate - [select for diffs], Mon Sep 24 13:05:10 2012 UTC (11 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.355: +2 -2 lines
Diff to previous 1.355 (colored)

Use pgrp of pty fd not pid of immediate child when recovering current
working directory (like current process). From Marcel Partap.

Revision 1.355 / (download) - annotate - [select for diffs], Mon Sep 3 12:20:17 2012 UTC (11 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.354: +2 -1 lines
Diff to previous 1.354 (colored)

When choosing a pane found by find-window, switch to that pane rather
than just the window. Also use a helper function for the inner loop.

Revision 1.354 / (download) - annotate - [select for diffs], Mon Sep 3 09:57:57 2012 UTC (11 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.353: +5 -1 lines
Diff to previous 1.353 (colored)

add cmd-choose-list to allow arbitrary options to be selected. From
Thomas Adam.

Revision 1.353 / (download) - annotate - [select for diffs], Mon Sep 3 09:32:38 2012 UTC (11 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.352: +12 -1 lines
Diff to previous 1.352 (colored)

Send notifications to control clients. Also don't redraw client when
suspended.

Revision 1.352 / (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.351: +2 -1 lines
Diff to previous 1.351 (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.351 / (download) - annotate - [select for diffs], Tue Aug 14 08:51:53 2012 UTC (11 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.350: +51 -11 lines
Diff to previous 1.350 (colored)

Use a separate define for each default format template and strip clutter
from the choose-tree defaults.

Revision 1.350 / (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.349: +8 -3 lines
Diff to previous 1.349 (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.349 / (download) - annotate - [select for diffs], Fri Jul 13 06:27:41 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.348: +6 -4 lines
Diff to previous 1.348 (colored)

Add a queue of notifys and a way to turn them off and on (we do not want
notifys to happen during some commands). Based on code from George
Nachman.

Revision 1.348 / (download) - annotate - [select for diffs], Wed Jul 11 07:10:15 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.347: +11 -4 lines
Diff to previous 1.347 (colored)

Make command exec functions return an enum rather than -1/0/1 values and
add a new value to mean "leave client running but don't attach" to fix
problems with using some commands in a command sequence. Most of the
work by Thomas Adam, problem reported by "jspenguin" on SF bug 3535531.

Revision 1.347 / (download) - annotate - [select for diffs], Tue Jul 10 11:53:01 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.346: +1 -2 lines
Diff to previous 1.346 (colored)

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

Revision 1.346 / (download) - annotate - [select for diffs], Sun Jul 8 16:04:38 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.345: +2 -1 lines
Diff to previous 1.345 (colored)

Add choose-tree command to show windows and sessions in the same
list. Change choose-window and -session to use the same code. From
Thomas Adam.

Revision 1.345 / (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.344: +2 -1 lines
Diff to previous 1.344 (colored)

Clear flags across all sessions, from Thomas Adam.

Revision 1.344 / (download) - annotate - [select for diffs], Mon Jun 25 14:27:25 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.343: +9 -7 lines
Diff to previous 1.343 (colored)

Provide common helper function for adding windows and sessions to choose
lists and expand %% in command before using it rather than at callback
time. From Thomas Adam.

Revision 1.343 / (download) - annotate - [select for diffs], Mon Jun 25 14:08:55 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.342: +24 -4 lines
Diff to previous 1.342 (colored)

Clean up and simplify the choose mode code, from Thomas Adam.

Revision 1.342 / (download) - annotate - [select for diffs], Mon Jun 18 13:16:42 2012 UTC (11 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.341: +7 -1 lines
Diff to previous 1.341 (colored)

Add a skeleton mode to tmux (called "control mode") that let's tmux
commands be sent and output received on stdout. This can be used to
integrate with other terminal emulators and should allow some other
things to be made simpler later. More to come so doesn't do much yet and
deliberately not documented.

Revision 1.341 / (download) - annotate - [select for diffs], Mon May 28 07:59:07 2012 UTC (11 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.340: +2 -4 lines
Diff to previous 1.340 (colored)

Strip layout from choose-windows again (leave in list-windows),
suggested by Romain Francoise, diff from Thomas Adam.

Revision 1.340 / (download) - annotate - [select for diffs], Sun May 27 21:43:57 2012 UTC (11 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.339: +3 -3 lines
Diff to previous 1.339 (colored)

Fix client templates, from Romain Francoise.

Revision 1.339 / (download) - annotate - [select for diffs], Fri May 25 08:28:10 2012 UTC (11 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.338: +2 -3 lines
Diff to previous 1.338 (colored)

Simplify logging and just fprintf(stderr, ...) for early errors.

Revision 1.338 / (download) - annotate - [select for diffs], Wed May 23 19:19:40 2012 UTC (11 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.337: +2 -1 lines
Diff to previous 1.337 (colored)

Use a predefined structure for not-space cells used to set attributes.

Revision 1.337 / (download) - annotate - [select for diffs], Tue May 22 14:32:28 2012 UTC (11 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.336: +7 -5 lines
Diff to previous 1.336 (colored)

Store client in tty struct directly instead of using a callback function
pointer.

Revision 1.336 / (download) - annotate - [select for diffs], Tue May 22 14:11:30 2012 UTC (11 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.335: +26 -25 lines
Diff to previous 1.335 (colored)

Store mouse data in tty structure not on the stack.

Revision 1.335 / (download) - annotate - [select for diffs], Tue May 22 11:35:37 2012 UTC (11 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.334: +33 -1 lines
Diff to previous 1.334 (colored)

Switch all of the various choose- and list- commands over to the format
infrastructure, from Thomas Adam.

Revision 1.334 / (download) - annotate - [select for diffs], Tue May 22 10:56:48 2012 UTC (11 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.333: +2 -1 lines
Diff to previous 1.333 (colored)

Add a helper function to send ready message.

Revision 1.333 / (download) - annotate - [select for diffs], Tue May 22 09:36:12 2012 UTC (11 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.332: +1 -3 lines
Diff to previous 1.332 (colored)

If there are any terminals with insert mode but not ich1, they can go
through the slow path. Tidies code slightly.

Revision 1.332 / (download) - annotate - [select for diffs], Mon May 21 18:27:42 2012 UTC (12 years ago) by nicm
Branch: MAIN
Changes since 1.331: +29 -14 lines
Diff to previous 1.331 (colored)

Instead of passing stdin/stdout/stderr file descriptors over imsg and
handling them in the server, handle them in the client and pass buffers
over imsg. This is much tidier for some upcoming changes and the
performance hit isn't critical.

The tty fd is still passed to the server as before.

This bumps the tmux protocol version so new clients and old servers are
incompatible.

Revision 1.331 / (download) - annotate - [select for diffs], Sun May 6 07:38:17 2012 UTC (12 years ago) by nicm
Branch: MAIN
Changes since 1.330: +2 -1 lines
Diff to previous 1.330 (colored)

Add a helper function to open the terminal for attach-/new-session.

Revision 1.330 / (download) - annotate - [select for diffs], Sun Apr 29 17:20:01 2012 UTC (12 years ago) by nicm
Branch: MAIN
Changes since 1.329: +2 -1 lines
Diff to previous 1.329 (colored)

Add a flag to move-window to renumber the windows in a session (closing
any gaps) and add an option to do this automatically each time a window
is killed. From Thomas Adam.

Revision 1.329 / (download) - annotate - [select for diffs], Wed Apr 25 21:12:49 2012 UTC (12 years ago) by nicm
Branch: MAIN
Changes since 1.328: +7 -1 lines
Diff to previous 1.328 (colored)

Add a buffer with all input from last ground state, will be used for
control mode. From George Nachman.

Revision 1.328 / (download) - annotate - [select for diffs], Wed Apr 11 06:16:14 2012 UTC (12 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.327: +2 -1 lines
Diff to previous 1.327 (colored)

Stop accepting new clients for 1 second on EMFILE/ENFILE. Based on
ongoing fixes to other daemons by Theo.

Revision 1.327 / (download) - annotate - [select for diffs], Sun Apr 1 21:45:48 2012 UTC (12 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.326: +8 -8 lines
Diff to previous 1.326 (colored)

Fix comment for mouse bits.

Revision 1.326 / (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.325: +16 -2 lines
Diff to previous 1.325 (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.325 / (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.324: +7 -2 lines
Diff to previous 1.324 (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.324 / (download) - annotate - [select for diffs], Sat Mar 17 22:56:04 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.323: +3 -2 lines
Diff to previous 1.323 (colored)

On xterm 271 and later, put the terminal into SCL 5 and use DECCRA for
scrolling the region in panes (if the large region check isn't
hit). With help from Ailin Nemui.

Revision 1.323 / (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.322: +11 -1 lines
Diff to previous 1.322 (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.322 / (download) - annotate - [select for diffs], Sat Mar 17 21:27:51 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.321: +2 -1 lines
Diff to previous 1.321 (colored)

Break out termios initialization into a separate function, from George
Nachman.

Revision 1.321 / (download) - annotate - [select for diffs], Thu Mar 15 10:36:00 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.320: +2 -1 lines
Diff to previous 1.320 (colored)

Send secondary DA to terminals with XT in terminfo when starting up and
parse it to work out the xterm version.

Revision 1.320 / (download) - annotate - [select for diffs], Fri Mar 9 21:42:13 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.319: +1 -5 lines
Diff to previous 1.319 (colored)

Remove some bits leftover from unused backoff code.

Revision 1.319 / (download) - annotate - [select for diffs], Fri Mar 9 09:57:40 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.318: +2 -2 lines
Diff to previous 1.318 (colored)

Use a lock file and flock() to serialize server start, avoids problems
when running a bunch of tmux from cron at the same time. Based on a diff
from Tim Ruehsen.

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

Add A and I keys for vi status line editing.

Revision 1.317 / (download) - annotate - [select for diffs], Sat Mar 3 09:43:23 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.316: +3 -1 lines
Diff to previous 1.316 (colored)

Support "bracketed paste" mode. This adds a -p flag to paste-buffer - if
this is used and the application has requested bracketed pastes, then
tmux surrounds the pasted text by \033[200~ and \033[201~. Applications
like vim can (apparently) use this to avoid, for example, indenting the
text. From Ailin Nemui.

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

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

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

Add move-pane command (like join-pane but allows the same window). Also
-b flag to join-pane and move-pane to place the pane to the left or
above. From George Nachman.

Revision 1.314 / (download) - annotate - [select for diffs], Fri Mar 2 11:16:44 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.313: +3 -3 lines
Diff to previous 1.313 (colored)

Add printf attribute to a couple of functions, from Tim Ruehsen.

Revision 1.313 / (download) - annotate - [select for diffs], Sat Feb 25 12:57:42 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.312: +4 -1 lines
Diff to previous 1.312 (colored)

Allow a single option to be specified to show-options to show just that
option.

Revision 1.312 / (download) - annotate - [select for diffs], Wed Feb 15 17:25:02 2012 UTC (12 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.311: +2 -1 lines
Diff to previous 1.311 (colored)

Add a wrapper function tty_set_size from George Nachman.

Revision 1.311 / (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.310: +2 -1 lines
Diff to previous 1.310 (colored)

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

Revision 1.310 / (download) - annotate - [select for diffs], Tue Jan 31 15:52:21 2012 UTC (12 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.309: +2 -2 lines
Diff to previous 1.309 (colored)

Provide defined ways to set the various default-path possibilities: ~
for home directory, . for server start directory, - for session start
directory and empty for the pane's working directory (the default). All
can also be used as part of a relative path (eg -/foo). Also provide -c
flags to neww and splitw to override default-path setting.

Based on a diff from sthen. ok sthen

Revision 1.309 / (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.308: +4 -1 lines
Diff to previous 1.308 (colored)

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

Revision 1.308 / (download) - annotate - [select for diffs], Sun Jan 29 09:37:02 2012 UTC (12 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.307: +7 -3 lines
Diff to previous 1.307 (colored)

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

Revision 1.307 / (download) - annotate - [select for diffs], Sat Jan 21 23:51:34 2012 UTC (12 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.306: +2 -3 lines
Diff to previous 1.306 (colored)

Remove unused backoff code that doesn't do any good.

Revision 1.306 / (download) - annotate - [select for diffs], Sat Jan 21 11:12:13 2012 UTC (12 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.305: +10 -10 lines
Diff to previous 1.305 (colored)

Use RB trees not SPLAY.

Revision 1.305 / (download) - annotate - [select for diffs], Sat Jan 21 08:40:09 2012 UTC (12 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.304: +2 -11 lines
Diff to previous 1.304 (colored)

Drop the ability to have a list of keys in the prefix in favour of two
separate options, prefix and prefix2. This simplifies the code and gets
rid the data options type which was only used for this one option.

Also add a -2 flag to send-prefix to send the secondary prefix key,
fixing a cause of minor irritation.

People who want three prefix keys are out of luck :-).

Revision 1.304 / (download) - annotate - [select for diffs], Sat Jan 21 08:10:21 2012 UTC (12 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.303: +2 -1 lines
Diff to previous 1.303 (colored)

Add a -R flag to send-keys to reset the terminal. Written ages ago and
Suggested by someone, I forget who.

Revision 1.303 / (download) - annotate - [select for diffs], Fri Jan 20 19:54:07 2012 UTC (12 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.302: +2 -2 lines
Diff to previous 1.302 (colored)

Add some const and fix a warning.

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

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

Revision 1.301 / (download) - annotate - [select for diffs], Fri Dec 9 16:28:18 2011 UTC (12 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.300: +3 -1 lines
Diff to previous 1.300 (colored)

Change the way the working directory for new processes is discovered. If
default-path isn't empty, it is used. Otherwise:

1) If tmux neww is run from the command line, the working directory of the
   client is used.

2) Otherwise sysctl KERN_PROC_CWD is used to retrieve the current
   working directory of the process in the active pane.

3) If that fails, the directory where the session was created is used.

Support code by Romain Francois, OpenBSD specific bits by me.

Note this requires a recent userland and kernel with KERN_PROC_CWD.

Revision 1.300 / (download) - annotate - [select for diffs], Sun Dec 4 16:18:01 2011 UTC (12 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.299: +3 -1 lines
Diff to previous 1.299 (colored)

Support "jump to" like vi in copy mode using t and T keys. Also add x
and X for delete in edit mode.

From Ben Boeckel, thanks.

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

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

Revision 1.298 / (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.297: +2 -2 lines
Diff to previous 1.297 (colored)

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

Revision 1.297 / (download) - annotate - [select for diffs], Sun Oct 23 10:16:14 2011 UTC (12 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.296: +3 -1 lines
Diff to previous 1.296 (colored)

Support for \e[3J to clear the history. Also send the corresponding
terminfo code (E3) before locking.

Revision 1.296 / (download) - annotate - [select for diffs], Sun Oct 23 08:34:01 2011 UTC (12 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.295: +2 -1 lines
Diff to previous 1.295 (colored)

Try to resolve relative paths for loadb and saveb (first using client
working directory if any then default-path or session wd).

Revision 1.295 / (download) - annotate - [select for diffs], Sun Oct 23 01:12:46 2011 UTC (12 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.294: +2 -1 lines
Diff to previous 1.294 (colored)

Add client formats, from Ben Boeckel.

Revision 1.294 / (download) - annotate - [select for diffs], Fri Aug 26 10:53:16 2011 UTC (12 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.293: +24 -1 lines
Diff to previous 1.293 (colored)

Add initial framework for more powerful formatting of command output and
use it for list-{panes,windows,sessions}. This allows more descriptive
replacements (such as #{session_name}) and conditionals.

Later this will be used for status_replace and list-keys and other
places.

Revision 1.293 / (download) - annotate - [select for diffs], Wed Aug 24 09:58:44 2011 UTC (12 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.292: +2 -1 lines
Diff to previous 1.292 (colored)

Add a tty_bell wrapper function, from Dylan Alex Simon.

Revision 1.292 / (download) - annotate - [select for diffs], Sat Jul 2 21:05:44 2011 UTC (12 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.291: +3 -3 lines
Diff to previous 1.291 (colored)

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

Revision 1.291 / (download) - annotate - [select for diffs], Mon Jun 27 00:04:49 2011 UTC (12 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.290: +1 -2 lines
Diff to previous 1.290 (colored)

PANE_FREEZE doesn't do anything anymore, so remove it.

Revision 1.290 / (download) - annotate - [select for diffs], Sun Jun 5 11:19:03 2011 UTC (12 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.289: +2 -1 lines
Diff to previous 1.289 (colored)

Add a respawn-pane command, from Marcel Partap.

Revision 1.289 / (download) - annotate - [select for diffs], Sun Jun 5 10:53:05 2011 UTC (12 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.288: +3 -5 lines
Diff to previous 1.288 (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.288 / (download) - annotate - [select for diffs], Fri May 20 19:17:39 2011 UTC (13 years ago) by nicm
Branch: MAIN
Changes since 1.287: +6 -1 lines
Diff to previous 1.287 (colored)

Support DECSCUSR sequence to set the cursor style with two new
terminfo(5) extensions, Cs and Csr. Written by Ailin Nemui.

Revision 1.287 / (download) - annotate - [select for diffs], Fri May 20 19:03:58 2011 UTC (13 years ago) by nicm
Branch: MAIN
Changes since 1.286: +12 -2 lines
Diff to previous 1.286 (colored)

Support xterm(1) cursor colour change sequences through terminfo(5) Cc
(set) and Cr (reset) extensions. Originally by Sean Estabrooks, tweaked
by me and Ailin Nemui.

Revision 1.286 / (download) - annotate - [select for diffs], Wed May 18 20:24:29 2011 UTC (13 years ago) by nicm
Branch: MAIN
Changes since 1.285: +7 -1 lines
Diff to previous 1.285 (colored)

Support setting the xterm clipboard when copying from copy mode using
the xterm escape sequence for the purpose (if xterm is configured to
allow it).

Written by and much discussed Ailin Nemui, guidance on
xterm/termcap/terminfo from Thomas Dickey.

Revision 1.285 / (download) - annotate - [select for diffs], Wed May 18 18:06:36 2011 UTC (13 years ago) by nicm
Branch: MAIN
Changes since 1.284: +4 -1 lines
Diff to previous 1.284 (colored)

Add three new copy-mode commands - select-line, copy-line,
copy-end-of-line. From Dave Disser and Randy Stauner a while back.

Revision 1.284 / (download) - annotate - [select for diffs], Sun May 8 20:34:12 2011 UTC (13 years ago) by nicm
Branch: MAIN
Changes since 1.283: +6 -1 lines
Diff to previous 1.283 (colored)

Add a new option, mouse-resize-pane. When on, panes may be resized by
dragging their borders. From hsim at gmx.li.

Revision 1.283 / (download) - annotate - [select for diffs], Sun May 8 19:53:07 2011 UTC (13 years ago) by nicm
Branch: MAIN
Changes since 1.282: +6 -3 lines
Diff to previous 1.282 (colored)

Use the tsl and fsl terminfo(5) capabilities to update terminal title
and automatically fill them in on terminals with the XT capability
(which means their title setting is xterm-compatible). From hsim at
gmx.li.

Revision 1.282 / (download) - annotate - [select for diffs], Tue Apr 19 21:31:33 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.281: +3 -1 lines
Diff to previous 1.281 (colored)

When mode-mouse is on (it is off by default), automatically enter copy
mode when the mouse is dragged or the mouse wheel is used. Also exit
copy mode when the mouse wheel is scrolled off the bottom. Discussed
with and written by hsim at gmx dot li.

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

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

Revision 1.280 / (download) - annotate - [select for diffs], Sat Apr 9 07:48:08 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.279: +2 -1 lines
Diff to previous 1.279 (colored)

If the terminal supports sitm for italics, use it instead of standout
(smso). From Tiago Resende.

Revision 1.279 / (download) - annotate - [select for diffs], Wed Apr 6 21:51:31 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.278: +2 -1 lines
Diff to previous 1.278 (colored)

Change so that an empty session name always means the current sessions
even if given with, for example, -t '', and explicitly forbid empty
session names and those containing a : when they are created.

Revision 1.278 / (download) - annotate - [select for diffs], Tue Apr 5 19:37:01 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.277: +3 -3 lines
Diff to previous 1.277 (colored)

Add a flag to cmd_find_session so that attach-session can prefer
unattached sessions when choosing the most recently used (if -t is not
given). Suggested by claudio@.

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

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

Revision 1.276 / (download) - annotate - [select for diffs], Mon Mar 28 19:44:31 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.275: +2 -2 lines
Diff to previous 1.275 (colored)

Style: uint -> u_int and a missing else.

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

Don't include meta twice when working out the flags to output for
xterm-style keys - bit 3 is accepted on input but not on output. Also a
style nit in the header.

Revision 1.274 / (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.273: +9 -1 lines
Diff to previous 1.273 (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.273 / (download) - annotate - [select for diffs], Mon Mar 7 23:46:27 2011 UTC (13 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.272: +3 -1 lines
Diff to previous 1.272 (colored)

Support passing through escape sequences to the underlying terminal by
using DCS with a "tmux;" prefix. Escape characters in the sequences must
be doubled. For example:

$ printf '\033Ptmux;\033\033]12;red\007\033\\'

Will pass \033]12;red\007 to the terminal (and change the cursor colour
in xterm). From Kevin Goodsell.

Revision 1.272 / (download) - annotate - [select for diffs], Thu Mar 3 08:51:47 2011 UTC (13 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.271: +2 -1 lines
Diff to previous 1.271 (colored)

Add a -P option to detach to HUP the client's parent process (usually
causing it to exit as well).

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

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

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

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

Revision 1.270 / (download) - annotate - [select for diffs], Wed Jan 26 00:11:47 2011 UTC (13 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.269: +5 -5 lines
Diff to previous 1.269 (colored)

Use LIST_* not SLIST_*.

Revision 1.269 / (download) - annotate - [select for diffs], Tue Jan 25 23:40:26 2011 UTC (13 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.268: +2 -1 lines
Diff to previous 1.268 (colored)

When clearing the entire screen, clear lines that are used into the
history like xterm does. Requested ages ago by someone I've forgotten.

Revision 1.268 / (download) - annotate - [select for diffs], Tue Jan 25 22:31:50 2011 UTC (13 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.267: +3 -2 lines
Diff to previous 1.267 (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.267 / (download) - annotate - [select for diffs], Sun Jan 23 11:03:43 2011 UTC (13 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.266: +4 -4 lines
Diff to previous 1.266 (colored)

Set $TMUX without the session when background jobs are run.

Revision 1.266 / (download) - annotate - [select for diffs], Sat Jan 15 00:16:00 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.265: +5 -7 lines
Diff to previous 1.265 (colored)

Mouse highlight mode (1001) requires a program to cooperate so
supporting it through tmux is not as easy as this, remove it for now.

Revision 1.265 / (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.264: +2 -1 lines
Diff to previous 1.264 (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.264 / (download) - annotate - [select for diffs], Tue Jan 4 00:42:47 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.263: +46 -73 lines
Diff to previous 1.263 (colored)

Clean up and simplify tmux command argument parsing.

Originally, tmux commands were parsed in the client process into a
struct with the command data which was then serialised and sent to the
server to be executed. The parsing was later moved into the server (an
argv was sent from the client), but the parse step and intermediate
struct was kept.

This change removes that struct and the separate parse step. Argument
parsing and printing is now common to all commands (in arguments.c) with
each command left with just an optional check function (to validate the
arguments at parse time), the exec function and a function to set up any
key bindings (renamed from the old init function).

This is overall more simple and consistent.

There should be no changes to any commands behaviour or syntax although
as this touches every command please watch for any unexpected changes.

Revision 1.263 / (download) - annotate - [select for diffs], Mon Jan 3 23:35:21 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.262: +8 -4 lines
Diff to previous 1.262 (colored)

Support for UTF-8 mouse input (\033[1005h). This was added in xterm 262
and supports larger terminals than the older way.

If the new mouse-utf8 option is on, UTF-8 mouse input is enabled for all
UTF-8 terminals. The option defaults to on if LANG etc are set in the
same manner as the utf8 option.

With help and based on code from hsim at gmx.li.

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

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

Revision 1.261 / (download) - annotate - [select for diffs], Sat Jan 1 03:39:21 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.260: +9 -7 lines
Diff to previous 1.260 (colored)

Sprinkle a little more const.

Revision 1.260 / (download) - annotate - [select for diffs], Sat Jan 1 03:32:28 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.259: +2 -2 lines
Diff to previous 1.259 (colored)

Another table that should be const.

Revision 1.259 / (download) - annotate - [select for diffs], Sat Jan 1 01:12:09 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.258: +2 -1 lines
Diff to previous 1.258 (colored)

Don't reset the activity timer for unattached sessions every second,
this screws up the choice of most-recently-used. Instead, break the time
update into a little function and do it when the session is attached.

Pointed out by joshe@.

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

Remove some unused defines.

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

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

By Tiago Cunha.

Revision 1.256 / (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.255: +3 -1 lines
Diff to previous 1.255 (colored)

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

Revision 1.255 / (download) - annotate - [select for diffs], Wed Dec 29 21:49:06 2010 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.254: +11 -5 lines
Diff to previous 1.254 (colored)

Support all four of the xterm mouse modes. Based on a diff from hsim at
gmx.li.

Revision 1.254 / (download) - annotate - [select for diffs], Tue Dec 21 22:37:59 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.253: +9 -3 lines
Diff to previous 1.253 (colored)

Store sessions in an RB tree by name rather than a list, this is tidier
and allows them to easily be shown sorted in various lists
(list-sessions/choose-sessions).

Keep a session index which is used in a couple of places internally but
make it an ever-increasing number rather than filling in gaps with new
sessions.

Revision 1.253 / (download) - annotate - [select for diffs], Mon Dec 20 00:19:20 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.252: +1 -2 lines
Diff to previous 1.252 (colored)

Dead sessions are never on the active sessions list, so the SESSION_DEAD
flag is effectively unused. Remove it.

Revision 1.252 / (download) - annotate - [select for diffs], Mon Dec 20 00:17:22 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.251: +2 -2 lines
Diff to previous 1.251 (colored)

Use pointer rather than index for the client's last session.

Revision 1.251 / (download) - annotate - [select for diffs], Mon Dec 20 00:03:55 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.250: +2 -1 lines
Diff to previous 1.250 (colored)

Unify the way sessions are used by callbacks - store the address and use
the reference count, then check it is still on the global sessions list
in the callback.

Revision 1.250 / (download) - annotate - [select for diffs], Sat Dec 11 18:39:25 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.249: +2 -1 lines
Diff to previous 1.249 (colored)

Track the last session for a client and add a flag to switch-client and
a key binding (L) to move a client back to its last session.

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

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

Revision 1.248 / (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.247: +6 -2 lines
Diff to previous 1.247 (colored)

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

Revision 1.247 / (download) - annotate - [select for diffs], Mon Nov 22 21:13:13 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.246: +3 -4 lines
Diff to previous 1.246 (colored)

There is somewhere that WINDOW_HIDDEN is getting set when it shouldn't
be and I can't find it, but the flag itself is a useless optimisation
that only applies to automatic-resize windows, so just dispose of it
entirely.

Fixes problems reported by Nicholas Riley.

Revision 1.246 / (download) - annotate - [select for diffs], Thu Nov 11 20:51:30 2010 UTC (13 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.245: +2 -2 lines
Diff to previous 1.245 (colored)

Declaration in header should be extern.

Revision 1.245 / (download) - annotate - [select for diffs], Fri Oct 29 20:11:57 2010 UTC (13 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.244: +2 -1 lines
Diff to previous 1.244 (colored)

We now send argv to the server after parsing it in the client to get the
command, so the client should not modify it. Instead, take a copy. Fixes
parsing command lists, reported by mcbride@.

Revision 1.244 / (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.243: +3 -1 lines
Diff to previous 1.243 (colored)

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

Revision 1.243 / (download) - annotate - [select for diffs], Mon Oct 18 20:00:03 2010 UTC (13 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.242: +9 -6 lines
Diff to previous 1.242 (colored)

Merge the before and after attach client code into one in client.c
(instead of two in tmux.c and client.c).

Revision 1.242 / (download) - annotate - [select for diffs], Tue Sep 28 07:15:45 2010 UTC (13 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.241: +1 -3 lines
Diff to previous 1.241 (colored)

Nuke a leftover RB tree declaration spotted by blambert.

Revision 1.241 / (download) - annotate - [select for diffs], Sun Sep 26 20:43:30 2010 UTC (13 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.240: +2 -1 lines
Diff to previous 1.240 (colored)

Two new options:

- server option "exit-unattached" makes the server exit when no clients
  are attached, even if sessions are present;

- session option "destroy-unattached" destroys a session once no clients
  are attached to it.

These are useful for preventing tmux remaining in the background where
it is undesirable and when using tmux as a login shell to keep a limit
on new sessions.

Revision 1.240 / (download) - annotate - [select for diffs], Sat Sep 11 16:19:22 2010 UTC (13 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.239: +6 -4 lines
Diff to previous 1.239 (colored)

Use UTF-8 line drawing characters on UTF-8 terminals. Fixes some stupid
terminals (I'm looking at you, putty) which disable the vt100 ACS mode
switching sequences in UTF-8 mode.

Also on terminals without ACS at all, use ASCII equivalents where
obvious.

Revision 1.239 / (download) - annotate - [select for diffs], Wed Sep 8 22:02:28 2010 UTC (13 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.238: +3 -1 lines
Diff to previous 1.238 (colored)

Add -n and -p flags to switch-client to move to the next and previous
session (yes, it doesn't match window/pane, but so what, nor does
switch-client).

Based on a diff long ago from "edsouza".

Revision 1.238 / (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.237: +3 -3 lines
Diff to previous 1.237 (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.237 / (download) - annotate - [select for diffs], Wed Aug 11 07:34:43 2010 UTC (13 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.236: +6 -3 lines
Diff to previous 1.236 (colored)

Change the way backoff works. Instead of stopping reading from the pty
when the client tty backs up too much, just stop updating the tty and
only update the internal screen. Then when the tty recovers, force a
redraw.

This prevents a dodgy client from causing other clients to go into
backoff while still allowing tmux to be responsive (locally) when seeing
lots of output.

Revision 1.236 / (download) - annotate - [select for diffs], Sat Jul 24 20:11:59 2010 UTC (13 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.235: +13 -5 lines
Diff to previous 1.235 (colored)

When changing so that the client passes its stdout and stderr as well as
stdin up to the server, I forgot one essential point - the tmux server
could now be both the producer and consumer. This happens when tmux is
run inside tmux, as well as when piping tmux commands together.

So, using stdio(3) was a bad idea - if sufficient data was written, this
could block in write(2). When that happened and the server was both
producer and consumer, it deadlocks.

Change to use libevent bufferevents for the client stdin, stdout and
stderr instead. This is trivial enough for output but requires a
callback mechanism to trigger when stdin is finished.

This relies on the underlying polling mechanism for libevent to work
with whatever devices to which the user could redirect stdin, stdout or
stderr, hence the change to use poll(2) over kqueue(2) for tmux.

Revision 1.235 / (download) - annotate - [select for diffs], Wed Jul 14 18:37:49 2010 UTC (13 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.234: +9 -3 lines
Diff to previous 1.234 (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.234 / (download) - annotate - [select for diffs], Sun Jul 11 17:06:45 2010 UTC (13 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.233: +6 -1 lines
Diff to previous 1.233 (colored)

Return the command client return code with MSG_EXIT now that MSG_ERROR and
MSG_PRINT are unused.

New clients should be compatible with old tmux servers but vice versa may print
an error.

Revision 1.233 / (download) - annotate - [select for diffs], Tue Jun 29 05:24:49 2010 UTC (13 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.232: +15 -1 lines
Diff to previous 1.232 (colored)

replace some magic mouse constants with defines for clarity. ok nicm

Revision 1.232 / (download) - annotate - [select for diffs], Tue Jun 29 03:30:14 2010 UTC (13 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.231: +8 -1 lines
Diff to previous 1.231 (colored)

Custom layouts. list-windows command displays the layout as a string (such as
"bb62,159x48,0,0{79x48,0,0,79x48,80,0}") and it can be applied to another
window (with the same number of panes or fewer) using select-layout.

Revision 1.231 / (download) - annotate - [select for diffs], Mon Jun 28 22:10:42 2010 UTC (13 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.230: +9 -8 lines
Diff to previous 1.230 (colored)

Send all three of stdin, stdout, stderr from the client to the server, so that
commands can directly make use of them. This means that load-buffer and
save-buffer can have "-" as the file to read from stdin or write to stdout.

This is a protocol version bump so the tmux server will need to be restarted
after upgrade (or an older client used).

Revision 1.230 / (download) - annotate - [select for diffs], Sun Jun 27 02:56:59 2010 UTC (13 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.229: +2 -1 lines
Diff to previous 1.229 (colored)

Store the current working directory in the session, change the default-path
option to default to empty and make that mean that the stored session CWD is
used.

Revision 1.229 / (download) - annotate - [select for diffs], Sat Jun 26 18:20:53 2010 UTC (13 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.228: +5 -2 lines
Diff to previous 1.228 (colored)

Setting the cmdlist pointer in the bind-key to NULL to prevent it being freed
after the command is executing is bogus because it may still be needed if the
same command is going to be executed again (for example if you "bind-key a
bind-key b ..."). Making a copy is hard, so instead add a reference count to
the cmd_list.

While here, also print bind-key -n and the rest of the flags properly.

Fixes problem reported by mcbride@.

Revision 1.228 / (download) - annotate - [select for diffs], Mon Jun 21 21:44:09 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.227: +3 -1 lines
Diff to previous 1.227 (colored)

Add a choose-buffer command for easier use of the paste buffer stack.

Revision 1.227 / (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.226: +3 -1 lines
Diff to previous 1.226 (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.226 / (download) - annotate - [select for diffs], Mon Jun 21 01:27:46 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.225: +9 -17 lines
Diff to previous 1.225 (colored)

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

Revision 1.225 / (download) - annotate - [select for diffs], Sun Jun 6 19:00:13 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.224: +5 -1 lines
Diff to previous 1.224 (colored)

Use a macro-based mask for obtaining a key or modifier-set from the
combination. Display C-@, etc, as C-Space, in list-keys. By Micah Cowan.

Revision 1.224 / (download) - annotate - [select for diffs], Sat Jun 5 16:47:11 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.223: +2 -2 lines
Diff to previous 1.223 (colored)

Fix problems with window sizing seen by Raghavendra D Prabhu when
starting tmux from .xinitrc.

One of the very few things the server relies on the client for now is to
pass through a message on SIGWINCH, but there is a condition where
potentially a SIGWINCH may be lost during the transition from unattached
(main.c) to attached (client.c). So trigger a size change immediately
after the client installs its SIGWINCH handler.

Also, when the terminal is resized, reset the scroll region and cursor
position. Previously, we were clearing our saved idea of these, but in
fact some terminals do not reset them on resize, so this caused problems
during redraw.

While here make a resize to the same size not cause a redraw and rename
the tmux.out output log file to include the tmux PID.

Revision 1.223 / (download) - annotate - [select for diffs], Mon May 31 19:51:29 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.222: +4 -3 lines
Diff to previous 1.222 (colored)

When the mode-mouse option is on, support dragging to make a selection
in copy mode.

Also support the scroll wheel, although xterm strangely does not ignore
it in application mouse mode, causing redraw artifacts when scrolling up
(other terminals appear to be better behaved).

Revision 1.222 / (download) - annotate - [select for diffs], Wed May 26 16:44:32 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.221: +2 -2 lines
Diff to previous 1.221 (colored)

Move imsg into libutil and add a man page.

Minor bump for libutil.

Previous versions of this diff and man page looked at by various people.

"you should just commit" deraadt

Revision 1.221 / (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.220: +6 -6 lines
Diff to previous 1.220 (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.220 / (download) - annotate - [select for diffs], Wed May 5 23:24:23 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.219: +1 -2 lines
Diff to previous 1.219 (colored)

Identical behaviour to select-prompt can now be obtained with
command-prompt, so remove select-prompt and change ' to be bound to
command-prompt -p index "select-window -t :%%".

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

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

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

Revert last change, it appears to be broken somehow.

Revision 1.217 / (download) - annotate - [select for diffs], Mon May 3 16:06:32 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.216: +6 -3 lines
Diff to previous 1.216 (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.216 / (download) - annotate - [select for diffs], Tue Apr 6 21:35:44 2010 UTC (14 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.215: +6 -6 lines
Diff to previous 1.215 (colored)

Merge copy mode and output mode, dropping the latter. Idea and code from
Micah Cowan.

Revision 1.215 / (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.214: +2 -1 lines
Diff to previous 1.214 (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.214 / (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.213: +1 -2 lines
Diff to previous 1.213 (colored)

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

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

Dead functions, lint.

Revision 1.212 / (download) - annotate - [select for diffs], Mon Mar 22 19:10:42 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.211: +5 -1 lines
Diff to previous 1.211 (colored)

Add vi-style "jump" commands for copy mode, from Micah Cowan.

Revision 1.211 / (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.210: +5 -1 lines
Diff to previous 1.210 (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.210 / (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.209: +25 -28 lines
Diff to previous 1.209 (colored)

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

Revision 1.209 / (download) - annotate - [select for diffs], Tue Mar 2 00:32:41 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.208: +2 -1 lines
Diff to previous 1.208 (colored)

Permit keys in copy mode to be prefixed by a repeat count, entered with
[1-9] in vi mode, or M-[1-9] in emacs mode.

From Micah Cowan, tweaked a little by me.

Revision 1.208 / (download) - annotate - [select for diffs], Fri Feb 19 00:03:21 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.207: +2 -1 lines
Diff to previous 1.207 (colored)

copy mode uses the real screen as backing and if it is updated while copying,
strange things can happen. So, freeze reading from the pty while in copy mode.

Revision 1.207 / (download) - annotate - [select for diffs], Thu Feb 11 20:39:40 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.206: +2 -1 lines
Diff to previous 1.206 (colored)

Add "N" key to search the opposite way from the last search (reverse of "n"),
from Micah Cowan.

Revision 1.206 / (download) - annotate - [select for diffs], Sat Feb 6 23:22:27 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.205: +7 -5 lines
Diff to previous 1.205 (colored)

Use the array.h code for the causes list.

Revision 1.205 / (download) - annotate - [select for diffs], Sat Feb 6 22:55:31 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.204: +3 -1 lines
Diff to previous 1.204 (colored)

Support attaching a client read-only with a new -r flag to the attach-session
command.

Revision 1.204 / (download) - annotate - [select for diffs], Sat Feb 6 17:35:01 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.203: +5 -3 lines
Diff to previous 1.203 (colored)

Rectangle copy support, from Robin Lee Powell.

Revision 1.203 / (download) - annotate - [select for diffs], Sat Feb 6 17:15:33 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.202: +7 -2 lines
Diff to previous 1.202 (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.202 / (download) - annotate - [select for diffs], Thu Feb 4 20:00:26 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.201: +4 -1 lines
Diff to previous 1.201 (colored)

vi-style B, W and E keys in copy mode to navigate between words treating only
spaces as word separators. Also add . to the list of word separators for
standard word navigation.

From Micah Cowan, tweaked slightly by me.

Revision 1.201 / (download) - annotate - [select for diffs], Mon Feb 1 22:15:51 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.200: +3 -1 lines
Diff to previous 1.200 (colored)

Add scroll-up/scroll-down for choose/more mode, from Micah Cowan.

Revision 1.200 / (download) - annotate - [select for diffs], Wed Jan 27 20:18:52 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.199: +2 -1 lines
Diff to previous 1.199 (colored)

Alter next-word to have vi-like movement behaviour, and add next-word-end with
the existing emacs behaviour. From Micah Cowan.

Revision 1.199 / (download) - annotate - [select for diffs], Mon Jan 25 21:33:39 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.198: +3 -1 lines
Diff to previous 1.198 (colored)

Top/bottom of history mode keys, diff from Micah Cowan, tweaked by me.

Revision 1.198 / (download) - annotate - [select for diffs], Thu Jan 7 20:52:18 2010 UTC (14 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.197: +5 -3 lines
Diff to previous 1.197 (colored)

New command, join-pane, to split and move an existing pane into the space (like
splitw then movep, or the reverse of breakp).

Revision 1.197 / (download) - annotate - [select for diffs], Sun Jan 3 12:51:05 2010 UTC (14 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.196: +4 -2 lines
Diff to previous 1.196 (colored)

Options to set the colour of the pane borders, with different colours for the
active pane.

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

Allow keys to be replaced and reorder the table so that terminfo-defined keys
(or terminal-overrides) take precedence over internally defined.

Revision 1.195 / (download) - annotate - [select for diffs], Mon Dec 14 10:43:41 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.194: +2 -5 lines
Diff to previous 1.194 (colored)

New server option, escape-time, to set the timeout used to detect if escapes
are alone or part of a function key or meta sequence.

Revision 1.194 / (download) - annotate - [select for diffs], Thu Dec 10 09:16:52 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.193: +3 -1 lines
Diff to previous 1.193 (colored)

Add "server options" which are server-wide and not bound to a session or
window. Set and displayed with "set -s" and "show -s".

Currently the only option is "quiet" (like command-line -q, allowing it to be
set from .tmux.conf), but others will come along.

Revision 1.193 / (download) - annotate - [select for diffs], Tue Dec 8 07:49:31 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.192: +4 -1 lines
Diff to previous 1.192 (colored)

Permit panes to be referred to as "top", "bottom", "top-left" etc, if the right
pane can be identified.

Revision 1.192 / (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.191: +65 -65 lines
Diff to previous 1.191 (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.191 / (download) - annotate - [select for diffs], Thu Dec 3 17:44:02 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.190: +7 -21 lines
Diff to previous 1.190 (colored)

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

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

Revision 1.190 / (download) - annotate - [select for diffs], Tue Dec 1 18:42:38 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.189: +2 -1 lines
Diff to previous 1.189 (colored)

New command, capture-pane, which copies the entire pane contents to a paste
buffer. From Jonathan Alvarado.

Revision 1.189 / (download) - annotate - [select for diffs], Mon Nov 30 16:44:03 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.188: +2 -2 lines
Diff to previous 1.188 (colored)

Handle partial xterm function key sequences.

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

This doesn't need to be u_int.

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

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

Revision 1.186 / (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.185: +3 -3 lines
Diff to previous 1.185 (colored)

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

Revision 1.185 / (download) - annotate - [select for diffs], Wed Nov 25 12:24:31 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.184: +2 -2 lines
Diff to previous 1.184 (colored)

Output the right keys for application and number keypad modes (they were the
wrong way round).

Revision 1.184 / (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.183: +5 -1 lines
Diff to previous 1.183 (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.183 / (download) - annotate - [select for diffs], Thu Nov 19 16:22:10 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.182: +3 -2 lines
Diff to previous 1.182 (colored)

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

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

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

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

Revision 1.181 / (download) - annotate - [select for diffs], Wed Nov 18 17:02:17 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.180: +15 -3 lines
Diff to previous 1.180 (colored)

Cleanup by moving various (mostly horrible) little bits handling UTF-8 grid
data into functions in a new file, grid-utf8.c, and use sizeof intead of
UTF8_DATA.

Also nuke trailing whitespace from tmux.1, reminded by jmc.

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

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

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

Revision 1.179 / (download) - annotate - [select for diffs], Fri Nov 13 19:58:32 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.178: +7 -1 lines
Diff to previous 1.178 (colored)

Tweak a comment and add some spacing.

Revision 1.178 / (download) - annotate - [select for diffs], Fri Nov 13 19:53:29 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.177: +4 -5 lines
Diff to previous 1.177 (colored)

Get rid of the ugly CMD_CHFLAG macro and use a const string (eg "dDU") in the
command entry structs and a couple of functions to check/set the flags.

Revision 1.177 / (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.176: +2 -1 lines
Diff to previous 1.176 (colored)

Destroy panes immediately rather than checking them all every loop.

Revision 1.176 / (download) - annotate - [select for diffs], Fri Nov 13 07:00:54 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.175: +1 -3 lines
Diff to previous 1.175 (colored)

Zap unused functions, prompted by deraadt.

Revision 1.175 / (download) - annotate - [select for diffs], Wed Nov 11 08:00:42 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.174: +2 -1 lines
Diff to previous 1.174 (colored)

Only need to chmod +x or -x the socket when a client is created, lost or
attached, rather than every event loop.

Revision 1.174 / (download) - annotate - [select for diffs], Tue Nov 10 17:41:35 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.173: +7 -4 lines
Diff to previous 1.173 (colored)

Whoops, this is needed for last commit as well.

Revision 1.173 / (download) - annotate - [select for diffs], Thu Nov 5 19:29:41 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.172: +7 -8 lines
Diff to previous 1.172 (colored)

Switch the tty key tree over to an (unbalanced) ternary tree which allows
partial matches to be done (they wait for further data or a timer to expire,
like a naked escape).

Mouse and xterm-style keys still expect to be atomic.

Revision 1.172 / (download) - annotate - [select for diffs], Thu Nov 5 10:44:36 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.171: +1 -5 lines
Diff to previous 1.171 (colored)

Key flags are only used for initialisation so they are not needed in the main
tty_key struct.

Revision 1.171 / (download) - annotate - [select for diffs], Thu Nov 5 08:48:15 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.170: +1 -4 lines
Diff to previous 1.170 (colored)

Now all timers are events, there is no longer any need to wake up every 50 ms -
only wake up when an event happens.

Revision 1.170 / (download) - annotate - [select for diffs], Thu Nov 5 08:45:08 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.169: +5 -3 lines
Diff to previous 1.169 (colored)

Switch tty key input over to happen on a read event. This is a bit more
complicated because of escape input, but in that case instead of processing a
key immediately, schedule a timer and reprocess the bufer when it expires.

This currently assumes that keys will be atomic (ie that if eg F1 is pressed
the entire sequence is present in the buffer). This is usually but not always
true, a change in the tree format so it can differentiate potential (partial)
key sequences will happens soon and will allow this to be fixed.

Revision 1.169 / (download) - annotate - [select for diffs], Thu Nov 5 00:05:00 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.168: +2 -2 lines
Diff to previous 1.168 (colored)

Convert the key repeat timer to an event.

Revision 1.168 / (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.167: +3 -3 lines
Diff to previous 1.167 (colored)

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

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

Move status timer check into the global once-per-second timer, this could maybe
be done better but one every second is better than once every 50 ms.

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

Use timeout events for the identify and message timers.

Revision 1.165 / (download) - annotate - [select for diffs], Wed Nov 4 23:12:43 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.164: +2 -2 lines
Diff to previous 1.164 (colored)

Don't reenlist the client imsg event every loop, instead have a small function
to it and call it after the event triggers or after a imsg is added.

Revision 1.164 / (download) - annotate - [select for diffs], Wed Nov 4 22:44:53 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.163: +1 -30 lines
Diff to previous 1.163 (colored)

Bye-bye buffer*.c.

Revision 1.163 / (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.162: +2 -6 lines
Diff to previous 1.162 (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.162 / (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.161: +2 -3 lines
Diff to previous 1.161 (colored)

Switch window pane pipe redirect fd over to a bufferevent.

Revision 1.161 / (download) - annotate - [select for diffs], Wed Nov 4 21:47:42 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.160: +2 -4 lines
Diff to previous 1.160 (colored)

Switch tty fds over to a bufferevent.

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

Switch jobs over to use a bufferevent.

Revision 1.159 / (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.158: +14 -16 lines
Diff to previous 1.158 (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.158 / (download) - annotate - [select for diffs], Tue Nov 3 22:40:40 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.157: +2 -1 lines
Diff to previous 1.157 (colored)

Add an activity time for clients, like for sessions, and change session and
client lookup to pick the most recently used rather than the most recently
created - this is much more useful when used interactively and (because the
activity time is set at creation) should have no effect on source-file.

Based on a problem reported by Jan Johansson.

Revision 1.157 / (download) - annotate - [select for diffs], Tue Nov 3 20:59:22 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.156: +2 -1 lines
Diff to previous 1.156 (colored)

If it isn't available explicitly, work out the current client in a similar way
to the current session - build a list of the possibilities then pick the
newest.

Revision 1.156 / (download) - annotate - [select for diffs], Tue Nov 3 20:29:47 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.155: +6 -4 lines
Diff to previous 1.155 (colored)

Change session and client activity and creation time members to have more
meaningful names.

Also, remove the code to try and update the session activity time for the
command client when a command message is received as is pointless because it
des not have a session.

Revision 1.155 / (download) - annotate - [select for diffs], Tue Nov 3 17:17:24 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.154: +1 -2 lines
Diff to previous 1.154 (colored)

tv member of struct paste_buffer is updated but not otherwise used, so remove
it.

Revision 1.154 / (download) - annotate - [select for diffs], Mon Nov 2 20:18:22 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.153: +2 -2 lines
Diff to previous 1.153 (colored)

Double the escape timer (the time after a \033 is received before tmux gives up
waiting to see if it is part of a key sequence and passes it through) to 500
ms, the previous setting was too fast. Suggested by naddy.

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

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

Fixes problems with changing options from inside #().

Revision 1.152 / (download) - annotate - [select for diffs], Wed Oct 28 22:53:14 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.151: +4 -1 lines
Diff to previous 1.151 (colored)

If any client currently displaying a window pane has more than 1 KB of output
buffered, don't accept any further data from the process running in the pane.

This makes tmux much more responsive when flooded with output, although other
buffers can still have an impact when running remotely.

Prompted by a query from Ranganathan Sankaralingam.

Revision 1.151 / (download) - annotate - [select for diffs], Tue Oct 27 13:03:33 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.150: +5 -1 lines
Diff to previous 1.150 (colored)

Move the poll registration functions into the server-*.c files.

Revision 1.150 / (download) - annotate - [select for diffs], Mon Oct 26 17:46:33 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.149: +5 -1 lines
Diff to previous 1.149 (colored)

Rewrite xterm-keys code (both input and output) so that works (doesn't always
output the same modifiers, accepts all the possible input keys) and is more
understandable.

Revision 1.149 / (download) - annotate - [select for diffs], Mon Oct 26 16:00:51 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.148: +61 -1 lines
Diff to previous 1.148 (colored)

Support the (mostly new) function key+modifier caps (kIC-kIC7). Most of these
will be caught (soon) by the xterm keys code in xterm itself but some other
descriptions such as rxvt define them as well.

Revision 1.148 / (download) - annotate - [select for diffs], Mon Oct 26 13:13:33 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.147: +18 -18 lines
Diff to previous 1.147 (colored)

Rename keypad keys to something more useful.

Revision 1.147 / (download) - annotate - [select for diffs], Sun Oct 25 21:11:21 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.146: +4 -6 lines
Diff to previous 1.146 (colored)

Remove the -d flag to tmux and just use op/AX to detect default colours.

Irritatingly, although op can be used to tell if a terminal supports default
colours, it can't be used to set them because in some terminfo descriptions it
resets attributes as a side-effect (acts as sgr0) and in others it doesn't, so
it is not possible to determine reliably what the terminal state will be
afterwards. So if AX is missing and op is present, tmux just sends sgr0.

Anyone using -d for a terminal who finds they actually needed it can replace it
using terminal-overrides, but please let me know as it is probably an omission
from terminfo.

Revision 1.146 / (download) - annotate - [select for diffs], Thu Oct 22 19:41:51 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.145: +15 -4 lines
Diff to previous 1.145 (colored)

Split the server code handling clients, jobs and windows off into separate
files from server.c (merging server-msg.c into the client file) and rather than
iterating over each set after poll(), allow a callback to be specified when the
fd is added and just walk once over the returned pollfds calling each callback
where needed.

More to come, getting this in so it is tested.

Revision 1.145 / (download) - annotate - [select for diffs], Wed Oct 21 20:11:47 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.144: +3 -22 lines
Diff to previous 1.144 (colored)

Client tidying: get rid of client_ctx struct in favour of two variables in
client.c, and move the functions in client-fn.c into other files.

Revision 1.144 / (download) - annotate - [select for diffs], Wed Oct 21 18:20:16 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.143: +1 -2 lines
Diff to previous 1.143 (colored)

Remove unused function.

Revision 1.143 / (download) - annotate - [select for diffs], Tue Oct 20 19:18:28 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.142: +23 -8 lines
Diff to previous 1.142 (colored)

Try to reduce the UTF-8 mess.

Get rid of passing around u_char[4]s and define a struct utf8_data which has
character data, size (sequence length) and width. Move UTF-8 character
collection into two functions utf8_open/utf8_append in utf8.c which fill in
this struct and use these functions from input.c and the various functions in
screen-write.c.

Space for rather more data than is necessary for one UTF-8 sequence is in the
utf8_data struct because screen_write_copy is still nasty and needs to reinject
the character (after combining) into screen_write_cell.

Revision 1.142 / (download) - annotate - [select for diffs], Tue Oct 20 17:33:33 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.141: +2 -2 lines
Diff to previous 1.141 (colored)

UTF-8 combined character fixes.

Thai can have treble combinations (1 x width=1 then 2 x width=0) so bump the
UTF-8 cell data size to 9 and alter the code to allow this.

Also break off the combining code into a separate function, handle any further
combining beyond the buffer size by replacing the character with _s, and when
redrawing the UTF-8 character don't assume the first part has just been
printed, redraw the entire line.

Revision 1.141 / (download) - annotate - [select for diffs], Tue Oct 20 14:22:57 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.140: +1 -2 lines
Diff to previous 1.140 (colored)

Nuke stray blank line.

Revision 1.140 / (download) - annotate - [select for diffs], Sat Oct 17 08:24:46 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.139: +6 -1 lines
Diff to previous 1.139 (colored)

Instead of having a complicated check to see if the cursor is in the last
position to avoid an explicit wrap, actually move it there.

Some UTF-8 fixes to come.

Revision 1.139 / (download) - annotate - [select for diffs], Tue Oct 13 15:38:37 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.138: +4 -2 lines
Diff to previous 1.138 (colored)

Move lines into the history when scrolling even if the scroll region is not
the entire screen.

Allows ircII users to see history, prompted by naddy.

Revision 1.138 / (download) - annotate - [select for diffs], Tue Oct 13 13:45:56 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.137: +4 -1 lines
Diff to previous 1.137 (colored)

Add mode keys to move the cursor to the top, middle and bottom of the screen.
H/M/L in vi mode and M-R/M-r in emacs (bottom of screen not bound in emacs).

Revision 1.137 / (download) - annotate - [select for diffs], Mon Oct 12 17:19:47 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.136: +2 -1 lines
Diff to previous 1.136 (colored)

When drawing lines that have wrapped naturally, don't force a newline but
permit them to wrap naturally again. This allows terminals that use this to
guess where lines start and end for eg mouse selecting (like xterm) to work
correctly.

This was another long-standing issue raised by several people over the last
while.

Thanks to martynas@ for much testing. This was not trivial to get right so
bringing it in for wider testing and adn to fix any further glitches in-tree.

Revision 1.136 / (download) - annotate - [select for diffs], Mon Oct 12 16:59:55 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.135: +2 -1 lines
Diff to previous 1.135 (colored)

When backspace is received at the beginning of a line and the previous line was
wrapped, move the cursor back up to the end of the previous line.

Another one of the forgotten persons requested this quite a while ago (I need
to start noting names on todo items...) when it was quite hard to
implement. Now it is easy and I don't see it can do any harm, so hey presto...

Revision 1.135 / (download) - annotate - [select for diffs], Mon Oct 12 13:01:18 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.134: +11 -2 lines
Diff to previous 1.134 (colored)

Use relative cursor movement instead of absolute when possible and when
supported by the terminal to reduce the size of the output data (generally
about 10-20%).

Revision 1.134 / (download) - annotate - [select for diffs], Mon Oct 12 09:29:58 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.133: +3 -2 lines
Diff to previous 1.133 (colored)

Similarly add a tty_cursor_pane function to tidy up most of the calls.

Revision 1.133 / (download) - annotate - [select for diffs], Mon Oct 12 09:16:59 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.132: +2 -2 lines
Diff to previous 1.132 (colored)

_absolute is redundant, just use tty_region.

Revision 1.132 / (download) - annotate - [select for diffs], Mon Oct 12 09:09:35 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.131: +3 -2 lines
Diff to previous 1.131 (colored)

Cleanup: use two functions for region setting, one for absolute and one inside
pane.

Revision 1.131 / (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.130: +6 -1 lines
Diff to previous 1.130 (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.130 / (download) - annotate - [select for diffs], Sun Oct 11 07:20:16 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.129: +5 -1 lines
Diff to previous 1.129 (colored)

Collect status from dead jobs and don't invoke the callback until both
all input (the socket is closed) and status is available.

Revision 1.129 / (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.128: +13 -5 lines
Diff to previous 1.128 (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.128 / (download) - annotate - [select for diffs], Sat Oct 10 18:42:14 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.127: +4 -2 lines
Diff to previous 1.127 (colored)

Put all jobs on a global all_jobs list and use that in server.c instead of
running through all the clients.

Revision 1.127 / (download) - annotate - [select for diffs], Sat Oct 10 17:19:38 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.126: +2 -1 lines
Diff to previous 1.126 (colored)

Split list-panes off from list-windows.

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

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

This brings several advantages:

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

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

Revision 1.125 / (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.124: +2 -1 lines
Diff to previous 1.124 (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.124 / (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.123: +24 -4 lines
Diff to previous 1.123 (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.123 / (download) - annotate - [select for diffs], Sat Oct 10 09:46:11 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.122: +2 -2 lines
Diff to previous 1.122 (colored)

Support for individual session idle time locking. May be enabled by turning off
the lock-server option (it is on by default). When this is off, each session
locks when it has been idle for the lock-after-time setting. When on, the
entire server locks when ALL sessions have been idle for their individual
lock-after-time settings.

This replaces one global-only option (lock-after-time) with another
(lock-server), but the default behaviour is usually preferable so there don't
seem to be many alternatives.

Diff/idea largely from Thomas Adam, tweaked by me.

Revision 1.122 / (download) - annotate - [select for diffs], Fri Oct 9 07:33:12 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.121: +1 -2 lines
Diff to previous 1.121 (colored)

The UTF-8 detection idea doesn't work and I am reasonably happy with the
current methods, so remove the (already #ifdef 0'd) code.

Revision 1.121 / (download) - annotate - [select for diffs], Tue Oct 6 07:19:32 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.120: +1 -6 lines
Diff to previous 1.120 (colored)

Remove scroll mode which is now redundant, copy mode should be used instead.

The = key binding now does nothing.

Revision 1.120 / (download) - annotate - [select for diffs], Tue Oct 6 07:09:00 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.119: +3 -1 lines
Diff to previous 1.119 (colored)

Make C-Up and C-Down in copy mode scroll the screen up and down one line
without moving the cursor, like Up and Down in scroll mode (which will shortly
disappear).

Revision 1.119 / (download) - annotate - [select for diffs], Mon Oct 5 18:30:54 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.118: +2 -1 lines
Diff to previous 1.118 (colored)

If no target client is specified to commands which accept one, try to guess the
current client, in a similar manner to how sessions already work: if the
current session can be established and has only one client, use that; otherwise
use the most recently created client.

Revision 1.118 / (download) - annotate - [select for diffs], Thu Sep 24 14:17:09 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.117: +5 -1 lines
Diff to previous 1.117 (colored)

New lock-client and lock-session commands to lock an individual client or all
clients attached to a session respectively.

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

Remove PROMPT_HIDDEN code which is now unused.

Revision 1.116 / (download) - annotate - [select for diffs], Wed Sep 23 12:03:31 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.115: +9 -3 lines
Diff to previous 1.115 (colored)

Support -c like sh(1) to execute a command, useful when tmux is a login
shell. Suggested by halex@.

This includes another protocol version increase (the last for now) so again
restart the tmux server before upgrading.

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

Remove the internal tmux locking and instead detach each client and run the
command specified by a new option "lock-command" (by default "lock -np") in
each client.

This means each terminal has to be unlocked individually but simplifies the
code and allows the system password to be used to unlock.

Note that the set-password command is gone, so it will need to be removed from
configuration files, and the -U command line flag has been removed.

This is the third protocol version change so again it is best to stop the tmux
server before upgrading.

Revision 1.114 / (download) - annotate - [select for diffs], Wed Sep 23 06:12:58 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.113: +3 -10 lines
Diff to previous 1.113 (colored)

Trim some code by moving the ioctl(TIOCGWINSZ) after SIGWINCH from the client
into the server.

This is another (the second of four) protocol version changes coming this
morning, so again the server should be killed before upgrading.

Revision 1.113 / (download) - annotate - [select for diffs], Wed Sep 23 06:05:02 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.112: +3 -5 lines
Diff to previous 1.112 (colored)

Don't attempt to open() the tty path, rely on the client sending its stdin fd
with imsg and fatal if it doesn't, then set the FD_CLOEXEC flag in tty_init
instead of tty_open to prevent them leaking into child processes if any are
created between the two calls.

This bumps the protocol version, so the tmux server should be killed before
upgrading.

Revision 1.112 / (download) - annotate - [select for diffs], Tue Sep 22 12:38:10 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.111: +13 -3 lines
Diff to previous 1.111 (colored)

Permit multiple prefix keys to be defined, separated by commas, for example:

set -g prefix ^a,^b

Any key in the list acts as the prefix. The send-prefix command always sends
the first key in the list.

Revision 1.111 / (download) - annotate - [select for diffs], Mon Sep 21 14:56:03 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.110: +4 -3 lines
Diff to previous 1.110 (colored)

Use option print function for info messages as well.

Revision 1.110 / (download) - annotate - [select for diffs], Mon Sep 21 14:46:47 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.109: +3 -1 lines
Diff to previous 1.109 (colored)

Move common code from show-options and show-window-options into a function.

Revision 1.109 / (download) - annotate - [select for diffs], Mon Sep 21 07:00:09 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.108: +4 -5 lines
Diff to previous 1.108 (colored)

Drop tiny union from option struct.

Revision 1.108 / (download) - annotate - [select for diffs], Mon Sep 21 06:55:06 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.107: +1 -3 lines
Diff to previous 1.107 (colored)

Key options were implemented as a number so these struct members are unused.

Revision 1.107 / (download) - annotate - [select for diffs], Sun Sep 20 19:15:02 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.106: +2 -1 lines
Diff to previous 1.106 (colored)

run-shell command to run a shell command without opening a window, sending
stdout to output mode.

Revision 1.106 / (download) - annotate - [select for diffs], Sun Sep 20 17:27:18 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.105: +4 -1 lines
Diff to previous 1.105 (colored)

Move some common and untidy code for window link/unlink into generic functions
instead of duplicating it in move/link window..

Revision 1.105 / (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.104: +2 -2 lines
Diff to previous 1.104 (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.104 / (download) - annotate - [select for diffs], Mon Sep 14 11:25:35 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.103: +1 -2 lines
Diff to previous 1.103 (colored)

Nuke unused server_client_index function, pointed out by martynas@.

Revision 1.103 / (download) - annotate - [select for diffs], Sat Sep 12 13:01:19 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.102: +2 -1 lines
Diff to previous 1.102 (colored)

Tidy some common code for destroying sessions into a new function.

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

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

Revision 1.101 / (download) - annotate - [select for diffs], Mon Sep 7 21:01:50 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.100: +9 -1 lines
Diff to previous 1.100 (colored)

Reference count clients and sessions rather than relying on a saved index for
cmd-choose-*.

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

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

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

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

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

That was the wrong fix. MSG_ERROR should set the error and the client should
use the error and exit on MSG_EXIT (it was being handled in the default
case). Undo the last change, move the errstr check into the MSG_EXIT case, and
add a comment.

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

Set exittype for error exit as well as the error string.

Revision 1.96 / (download) - annotate - [select for diffs], Wed Sep 2 17:34:57 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.95: +2 -1 lines
Diff to previous 1.95 (colored)

Accept -l to make it easier for people who use tmux as a login shell to use
$SHELL. Originally from martynas@, tweaked by me.

Revision 1.95 / (download) - annotate - [select for diffs], Wed Sep 2 16:38:35 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.94: +3 -1 lines
Diff to previous 1.94 (colored)

When incorrect passwords are entered, behave similarly to login(1) and backoff
for a bit. Based on a diff from martynas@.

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

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

Revision 1.93 / (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.92: +9 -5 lines
Diff to previous 1.92 (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.92 / (download) - annotate - [select for diffs], Mon Aug 31 20:46:19 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.91: +9 -1 lines
Diff to previous 1.91 (colored)

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

Revision 1.91 / (download) - annotate - [select for diffs], Tue Aug 25 12:18:51 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.90: +3 -1 lines
Diff to previous 1.90 (colored)

Add a choose-client command and extend choose-{session,window} to accept a
template. After a choice is made, %% (or %1) in the template is replaced by the
name of the session, window or client suitable for -t and the result executed
as a command. So, for example, "choose-window "killw -t '%%'"" will kill the
selected window.

The defaults if no template is given are (as now) select-window for
choose-window, switch-client for choose-session, and detach-client for
choose-client (now bound to D).

Revision 1.90 / (download) - annotate - [select for diffs], Mon Aug 24 08:03:11 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.89: +8 -1 lines
Diff to previous 1.89 (colored)

gcc2 doesn't understand attributes on function pointers.

Revision 1.89 / (download) - annotate - [select for diffs], Sun Aug 23 17:29:51 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.88: +2 -2 lines
Diff to previous 1.88 (colored)

When using source-file, run the commands in the context of the source-file
command rather than with no context. This makes things like attach work from a
file.

Revision 1.88 / (download) - annotate - [select for diffs], Sun Aug 23 16:45:00 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.87: +1 -3 lines
Diff to previous 1.87 (colored)

The cursession member in struct cmd_ctx is always either curclient->session or
NULL when curclient is also NULL, so just eliminate it.

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

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

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

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

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

From Tiago Cunha.

Revision 1.86 / (download) - annotate - [select for diffs], Tue Aug 18 21:41:13 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.85: +2 -1 lines
Diff to previous 1.85 (colored)

Instead of just checking for an empty buffer, which may not be the case if
there is unconsumed data, save the previous size and use it instead. This means
that activity monitoring should work in this (unlikely) event.

Also remove a debugging statement that no longer seems necessary.

Revision 1.85 / (download) - annotate - [select for diffs], Tue Aug 18 14:48:42 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.84: +6 -6 lines
Diff to previous 1.84 (colored)

Tag a few missed printf-like functions and fix a missing "%s".

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

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

Revision 1.83 / (download) - annotate - [select for diffs], Tue Aug 18 07:08:26 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.82: +5 -1 lines
Diff to previous 1.82 (colored)

Add (naive) searching and goto line in copy mode. Searching is C-r and C-s with
emacs keys, / and ? with vi; n repeats the search again with either key
set. All searching wraps the top/bottom. Goto line is g for both emacs and vi.

The search prompts don't have full line editing, just simple append and delete
characters.

Also sort the mode keys list in tmux.1.

Revision 1.82 / (download) - annotate - [select for diffs], Thu Aug 13 22:32:18 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.81: +4 -2 lines
Diff to previous 1.81 (colored)

vi(1)-style half page scroll in copy and scroll modes. Move the vi full page
scroll key to C-b instead of C-u and use C-u/C-d for half page scrolling with
vi keys. In emacs mode, half page scrolling is bound to M-Up and M-Down.

Suggested by merdely (about a year ago :-)).

Revision 1.81 / (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.80: +4 -3 lines
Diff to previous 1.80 (colored)

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

Revision 1.80 / (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.79: +9 -6 lines
Diff to previous 1.79 (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.79 / (download) - annotate - [select for diffs], Wed Aug 12 09:41:59 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.78: +18 -17 lines
Diff to previous 1.78 (colored)

A tty context must not be modified as it may be reused to update multiple
clients, so make it const.

Also fix an actual modification which caused a hang when a session was
connected to multiple terminals at least one of which was missing ich/ich1.

Revision 1.78 / (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.77: +2 -2 lines
Diff to previous 1.77 (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.77 / (download) - annotate - [select for diffs], Tue Aug 11 20:29:04 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.76: +2 -1 lines
Diff to previous 1.76 (colored)

Add a TTY_OPENED flag and tidy a little.

Revision 1.76 / (download) - annotate - [select for diffs], Tue Aug 11 19:32:25 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.75: +4 -3 lines
Diff to previous 1.75 (colored)

Drop the no_stop argument to tty_close and tty_free in favour of a flag in the
tty struct.

Revision 1.75 / (download) - annotate - [select for diffs], Tue Aug 11 17:18:35 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.74: +8 -18 lines
Diff to previous 1.74 (colored)

Switch tmux to use imsg. This is the last major change to make the
client-server protocol more resilient and make the protocol versioning work
properly. In future, the only things requiring a protocol version bump will be
changes in the message structs, and (when both client and server have this
change) mixing different versions should nicely report an error message.

As a side effect this also makes the code tidier, fixes a problem with the way
errors reported during server startup were handled, and supports fd passing
(which will be used in future).

Looked over by eric@, thanks.

Please note that mixing a client with this change with an older server or vice
versa may cause tmux to crash or hang - tmux should be completely exited before
upgrading.

Revision 1.74 / (download) - annotate - [select for diffs], Tue Aug 11 12:53:37 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.73: +9 -19 lines
Diff to previous 1.73 (colored)

Add flags for 1+2 and 2 arguments to the generic target code, use it for
cmd-set-environment/option/window-option and remove the generic options
parsing.

Revision 1.73 / (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.72: +42 -6 lines
Diff to previous 1.72 (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.72 / (download) - annotate - [select for diffs], Sat Aug 8 15:57:49 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.71: +7 -2 lines
Diff to previous 1.71 (colored)

Add a flags member to the grid_line struct and use it to differentiate lines
wrapped at the screen edge from those terminated by a newline. Then use this
when copying to combine wrapped lines together into one.

Revision 1.71 / (download) - annotate - [select for diffs], Sat Aug 8 13:29:27 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.70: +11 -6 lines
Diff to previous 1.70 (colored)

Change the way the grid is stored, previously it was:

- a two-dimensional array of cells;
- a two-dimensional array of utf8 data;
- an array of line lengths.

Now it is a single array of a new struct grid_line each of which represents a
line and containts the length and an array of cells and an array of utf8 data.

This will make it easier to add additional per-line members, such as flags.

Revision 1.70 / (download) - annotate - [select for diffs], Fri Aug 7 15:39:10 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.69: +2 -1 lines
Diff to previous 1.69 (colored)

If there is an error in the configuration file, don't just exit(1) as this can
cause the client to hang. Instead, send the error message, then mark the client
as bad and start a normal shutdown so the server exits once the error is
written.

This also allows some code duplicating daemon(3) to be trimmed and logging to
begin earlier.

Prompted by Theo noticing the behaviour on error wasn't documented.

Revision 1.69 / (download) - annotate - [select for diffs], Fri Aug 7 00:12:13 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.68: +2 -2 lines
Diff to previous 1.68 (colored)

Using the alternative screen (smcup/rmcup) should also preserve the current
colours and attributes. Found thanks to a report from Taylor Venable.

While here also nuke a couple of extra blank lines.

Revision 1.68 / (download) - annotate - [select for diffs], Tue Aug 4 18:45:57 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.67: +6 -6 lines
Diff to previous 1.67 (colored)

Add a -a flag to set-option and set-window-option to append to an existing
string value, useful for terminal-overrides.

Revision 1.67 / (download) - annotate - [select for diffs], Mon Aug 3 14:10:54 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.66: +3 -3 lines
Diff to previous 1.66 (colored)

Add a terminal-overrides session option allowing individual terminfo(5) entries
to be overridden. The 88col/256col checks are now moved into the default
setting and out of the code.

Also remove a couple of old workarounds for xterm and rxvt which are no longer
necessary (tmux can emulate them if missing).

Revision 1.66 / (download) - annotate - [select for diffs], Thu Jul 30 16:32:12 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.65: +2 -3 lines
Diff to previous 1.65 (colored)

There aren't many client message types or code to handle them so get rid of the
lookup table and use a switch, merge the tiny handler functions into it, and
move the whole lot to client.c.

Also change client_msg_dispatch to consume as many messages as possible and
move the call to it to the right place so it checks for signals afterwards.

Prompted by suggestions from eric@.

Revision 1.65 / (download) - annotate - [select for diffs], Thu Jul 30 13:45:56 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.64: +7 -15 lines
Diff to previous 1.64 (colored)

Merge pane number into the target specification for pane commands. Instead of
using -p index, a target pane is now addressed with the normal -t window form
but suffixed with a period and a pane index, for example :0.2 or
mysess:mywin.1. An unadorned number such as -t 1 is tried as a pane index in
the current window, if that fails the same rules are followed as for a target
window and the current pane in that window used.

As a side-effect this now means that swap-pane can swap panes between different
windows.

Note that this changes the syntax of the break-pane, clear-history, kill-pane,
resize-pane, select-pane and swap-pane commands.

Revision 1.64 / (download) - annotate - [select for diffs], Wed Jul 29 14:17:26 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.63: +6 -6 lines
Diff to previous 1.63 (colored)

Rename struct hdrtype to msgtype which is a better name and can be used even
when struct hdr disappears.

Revision 1.63 / (download) - annotate - [select for diffs], Tue Jul 28 17:05:10 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.62: +3 -1 lines
Diff to previous 1.62 (colored)

Final pieces of mode key rebinding: bind-key and unbind-key now accept a -t
argument to modify a table.

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

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

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

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

Revision 1.60 / (download) - annotate - [select for diffs], Mon Jul 27 20:36:13 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.59: +1 -3 lines
Diff to previous 1.59 (colored)

Remove an unused entry in the mode keys command enum and rename
MODEKEYCOPY_QUIT to _CANCEL to match the others.

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

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

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

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

Get rid of empty mode_key_free function.

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

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

From Kalle Olavi Niemitalo.

Revision 1.56 / (download) - annotate - [select for diffs], Sun Jul 26 21:42:08 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.55: +4 -1 lines
Diff to previous 1.55 (colored)

Detect backspace by looking at termios VERASE and translate it into \177 (which
matches screen's behaviour if not its termcap/terminfo entry). The terminfo kbs
cap is often wrong or missing so it can't be used, and just assuming \177 may
be wrong.

Revision 1.55 / (download) - annotate - [select for diffs], Sun Jul 26 12:58:44 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.54: +34 -26 lines
Diff to previous 1.54 (colored)

Make all messages sent between the client and server fixed size.

This is the first of two changes to make the protocol more resilient and less
sensitive to other changes in the code, particularly with commands. The client
now packs argv into a buffer and sends it to the server for parsing, rather
than doing it itself and sending the parsed command data.

As a side-effect this also removes a lot of now-unused command marshalling
code.

Mixing a server without this change and a client with or vice versa will cause
tmux to hang or crash, please ensure that tmux is entirely killed before
upgrading.

Revision 1.54 / (download) - annotate - [select for diffs], Fri Jul 24 14:52:47 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.53: +9 -7 lines
Diff to previous 1.53 (colored)

Permit commands to be bound to key presses without the prefix key first. The
new -n flag to bind-key and unbind-key sets or removes these bindings, and
list-key shows them in []s.

Revision 1.53 / (download) - annotate - [select for diffs], Thu Jul 23 20:24:27 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.52: +9 -6 lines
Diff to previous 1.52 (colored)

Tidy client message return slightly: convert flags into an enum, and merge
error string into struct client_ctx as well.

Revision 1.52 / (download) - annotate - [select for diffs], Thu Jul 23 12:33:48 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.51: +3 -2 lines
Diff to previous 1.51 (colored)

Both of cmdclient and curclient CAN be NULL - if the command is executed from
the configuration file. In this case, attach-session can't do much, and
new-session should just assume -d.

Revision 1.51 / (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.50: +2 -2 lines
Diff to previous 1.50 (colored)

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

Revision 1.50 / (download) - annotate - [select for diffs], Wed Jul 22 20:56:58 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.49: +1 -5 lines
Diff to previous 1.49 (colored)

tty_write is relatively short and the only function left in tty-write.c so move
it into tty.c.

Revision 1.49 / (download) - annotate - [select for diffs], Wed Jul 22 20:53:38 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.48: +15 -13 lines
Diff to previous 1.48 (colored)

More tty code tidying: move the saved cursor/region position (from before the
screen was updated) out of struct screen and into struct tty_ctx.

Revision 1.48 / (download) - annotate - [select for diffs], Wed Jul 22 18:06:58 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)

log_debug3 no longer exists, change the sole use in GRID_DEBUG to log_debug2.

Revision 1.47 / (download) - annotate - [select for diffs], Wed Jul 22 18:02:23 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.46: +57 -65 lines
Diff to previous 1.46 (colored)

enum tty_cmd is only used as an index into the array of command function
pointers, so remove it and use the function pointers directly to represent
themselves.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Jul 22 16:45:31 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.45: +16 -4 lines
Diff to previous 1.45 (colored)

There are relatively few arguments to tty_cmd_* functions now, so tidy them up
by using a struct rather than hiding everything with varargs.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Jul 22 15:55:32 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

tty_cmd_raw is only used once, for raw UTF-8 output, so rename it to
tty_cmd_utf8character and eliminate the size argument.

Revision 1.44 / (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.43: +4 -5 lines
Diff to previous 1.43 (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.43 / (download) - annotate - [select for diffs], Tue Jul 21 18:40:30 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.42: +1 -3 lines
Diff to previous 1.42 (colored)

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

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

__progname is not const, pointed out by deraadt.

Revision 1.41 / (download) - annotate - [select for diffs], Tue Jul 21 17:57:29 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.40: +63 -74 lines
Diff to previous 1.40 (colored)

Tidy up keys: use an enum for the key codes, and remove the macros which just
wrap flag sets/clears/tests.

Revision 1.40 / (download) - annotate - [select for diffs], Mon Jul 20 14:37:51 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.39: +2 -1 lines
Diff to previous 1.39 (colored)

Display the number of failed password attempts (if any) when the server is
locked. From Tom Doherty.

Revision 1.39 / (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.38: +68 -17 lines
Diff to previous 1.38 (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.38 / (download) - annotate - [select for diffs], Sat Jul 18 14:59:25 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored)

Add three new session options: visual-activity, visual-bell, visual-content. If
these are enabled (and the monitor-activity, bell-actio and monitor-content
options are configurated appropriately), when activity, a bell, or content is
detected, a message is shown.

Also tidy up the bell/activity/content code in server.c slightly and fix a
couple of errors.

Revision 1.37 / (download) - annotate - [select for diffs], Fri Jul 17 20:37:03 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.36: +2 -1 lines
Diff to previous 1.36 (colored)

Make it so using kill-pane to destroy the last pane in a window destroys the
window instead of being an error.

Revision 1.36 / (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.35: +5 -2 lines
Diff to previous 1.35 (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.35 / (download) - annotate - [select for diffs], Fri Jul 17 15:03:11 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.34: +11 -1 lines
Diff to previous 1.34 (colored)

Tidy up new-session and attach-session and change them to work from inside
tmux, switching the current client to the new or requested session.

Written with Josh Elsasser.

Revision 1.34 / (download) - annotate - [select for diffs], Fri Jul 17 07:05:58 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored)

A similar for fix for window_choose: don't rely on the callback always being
called to free data, have a separate free callback and call it from the mode
cleanup code.

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

Memory could be leaked if a second prompt or message appeared while another was
still present, so add a separate prompt free callback and make the _clear
function responsible for calling it if necessary (rather than the individual
prompt callbacks). Also make both messages and prompts clear any existing when
a new is set.

In addition, the screen could be modified while the prompt is there, restore
the redraw-entire-screen behaviour on prompt clear; add a comment as a
reminder.

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

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

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

Having to update NSETOPTION/NSETWINDOWOPTION when adding new options is a bit
annoying and it is only use for iterating, so use a sentinel to mark the end of
each array instead. Different fix for a problem pointed out by Kalle Olavi
Niemitalo.

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

Add main-pane-height to the options list (was missed before).

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

Instead of faking up a status line in status_redraw, use the same code to
redraw it as to draw the entire screen, just skip all lines but the last.

This makes horizontal split redraw properly when the status line is off.

Revision 1.28 / (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.27: +4 -4 lines
Diff to previous 1.27 (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.27 / (download) - annotate - [select for diffs], Mon Jul 13 23:11:35 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.26: +11 -15 lines
Diff to previous 1.26 (colored)

Having fixed flags for single-character getopt options is a bit hard to
maintain and is only going to get worse as more are used. So instead, add a new
uint64_t member to cmd_entry which is a bitmask of upper and lowercase options
accepted by the command.

This means new single character options can be used without the need to add it
explicitly to the list.

Revision 1.26 / (download) - annotate - [select for diffs], Mon Jul 13 17:47:46 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.25: +4 -7 lines
Diff to previous 1.25 (colored)

Tidy up and improve target (-t) argument parsing:

- move the code back into cmd.c and merge with the existing functions where
  possible;
- accept "-tttyp0" as well as "-t/dev/ttyp0" for clients;
- when looking up session names, try an exact match first, and if that fails
  look for it as an fnmatch pattern and then as the start of a name - if more
  that one session matches an error is given; so if there is one session called
  "mysession", -tmysession, -tmysess, -tmysess* are equivalent but if there
  is also "mysession2", the last two are errors;
- similarly for windows, if the argument is not a valid index or exact window
  name match, try it against the window names as an fnmatch pattern and a
  prefix.

Revision 1.25 / (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.24: +11 -1 lines
Diff to previous 1.24 (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.24 / (download) - annotate - [select for diffs], Sun Jul 12 23:46:49 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.23: +2 -1 lines
Diff to previous 1.23 (colored)

Missed this declaration in key bindings change. Whoops.

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

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

Revision 1.22 / (download) - annotate - [select for diffs], Sun Jul 12 16:07:56 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.21: +3 -2 lines
Diff to previous 1.21 (colored)

If it exist, load a system-wide configuration file /etc/tmux.conf before any
user-specified one.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Jul 11 19:14:56 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.20: +2 -1 lines
Diff to previous 1.20 (colored)

When pasting, translate \n into \r. This matches xterm and putty's behaviour,
and makes emacs happy when pasting into some modes. A new -r (raw) flag to
paste-buffer pastes without the translation.

From Kalle Olavi Niemitalo, thanks!

Revision 1.20 / (download) - annotate - [select for diffs], Fri Jul 10 05:50:54 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

Add a default-terminal option to set the starting value of $TERM in new
windows.

This is "screen" by default and must be either that or something closely
related. This does makes it easier to customise it if necessary.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Jul 9 15:47:49 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.18: +2 -1 lines
Diff to previous 1.18 (colored)

New command, if-shell (alias if). Executes the tmux command in the second
argument if the shell command in the first succeeds, for example:

       if "[ -e ~/.tmux.conf.alt ]" "source .tmux.conf.alt"

Written by Tiago Cunha, many thanks.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Jul 9 00:29:32 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.17: +3 -5 lines
Diff to previous 1.17 (colored)

Tidy by removing unused argument from grid_view_{insert,delete}_line_region
functions (currently don't fully work, this is to make fix easier).

Revision 1.17 / (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.16: +2 -1 lines
Diff to previous 1.16 (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.16 / (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.15: +3 -3 lines
Diff to previous 1.15 (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.15 / (download) - annotate - [select for diffs], Fri Jun 26 19:44:36 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.14: +1 -6 lines
Diff to previous 1.14 (colored)

Remove some unused function declarations; no binary change.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Jun 25 22:08:15 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.13: +3 -1 lines
Diff to previous 1.13 (colored)

#ifndef nitems to avoid redefining it if it is already in a header.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Jun 25 06:23:10 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.12: +1 -6 lines
Diff to previous 1.12 (colored)

tmux doesn't and won't need syslog logging, so remove it and some other unused
functions found by lint.

Also move a couple of internal function declarations into file scope.

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

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

Revision 1.11 / (download) - annotate - [select for diffs], Thu Jun 25 06:05:47 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.10: +1 -11 lines
Diff to previous 1.10 (colored)

Nuke unused buffer functions. Found by lint.

Also remove some old debug output which was #if 0.

Revision 1.10 / (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.9: +3 -6 lines
Diff to previous 1.9 (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.9 / (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.8: +3 -1 lines
Diff to previous 1.8 (colored)

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

Revision 1.8 / (download) - annotate - [select for diffs], Wed Jun 24 16:01:02 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.7: +2 -1 lines
Diff to previous 1.7 (colored)

Trying to predict the cursor position for UTF-8 output in the same way as for
normal eight-bit output is wrong, separate it into a different function. Fixes
spacing when mixing UTF-8 with some escape sequences, notably the way w3m does
it.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jun 24 05:35:07 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

Constify utf8_width() function argument.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Jun 4 18:48:24 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.5: +5 -1 lines
Diff to previous 1.5 (colored)

Proper support for tab stops (\033H etc), using a bitstring(3). Makes another
vttest test happy.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Jun 3 23:30:40 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.4: +3 -1 lines
Diff to previous 1.4 (colored)

Implement the DEC alignment test. With the last change this is enough for the
first cursor test in vttest (in ports) to pass; it still shops a few more
problems though.

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

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

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

Add a UTF-8 aware string length function and make UTF-8 in
status-left/status-right work properly. At the moment any top-bit-set
characters are assumed to be UTF-8: a status-utf8 option to configure this will
come shortly.

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

When swapping pane positions, swap the PANE_HIDDEN flag as well, otherwise tmux
crashes when trying to find the new active pane.

While here, nuke an unused pane flag.

Fixes PR 6160, reported by and a slightly different version of diff tested by
ralf.horstmann at gmx.de.

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.