Revision: 2778
http://tmux.svn.sourceforge.net/tmux/?rev=2778&view=rev
Author: tcunha
Date: 2012-04-24 16:19:27 +0000 (Tue, 24 Apr 2012)
Log Message:
-----------
Sync OpenBSD patchset 1096:
Add -a flag to kill-window, from Thomas Adam.
Modified Paths:
--------------
trunk/cmd-kill-window.c
trunk/tmux.1
Modified: trunk/cmd-kill-window.c
===================================================================
--- trunk/cmd-kill-window.c 2012-04-24 16:18:35 UTC (rev 2777)
+++ trunk/cmd-kill-window.c 2012-04-24 16:19:27 UTC (rev 2778)
@@ -28,8 +28,8 @@
const struct cmd_entry cmd_kill_window_entry = {
"kill-window", "killw",
- "t:", 0, 0,
- CMD_TARGET_WINDOW_USAGE,
+ "at:", 0, 0,
+ "[-a] " CMD_TARGET_WINDOW_USAGE,
0,
NULL,
NULL,
@@ -40,13 +40,19 @@
cmd_kill_window_exec(struct cmd *self, struct cmd_ctx *ctx)
{
struct args *args = self->args;
- struct winlink *wl;
+ struct winlink *wl, *wl2;
if ((wl = cmd_find_window(ctx, args_get(args, 't'), NULL)) == NULL)
return (-1);
- server_kill_window(wl->window);
+ if (args_has(args, 'a')) {
+ RB_FOREACH(wl2, winlinks, &ctx->curclient->session->windows) {
+ if (wl != wl2)
+ server_kill_window(wl2->window);
+ }
+ } else
+ server_kill_window(wl->window);
+
recalculate_sizes();
-
return (0);
}
Modified: trunk/tmux.1
===================================================================
--- trunk/tmux.1 2012-04-24 16:18:35 UTC (rev 2777)
+++ trunk/tmux.1 2012-04-24 16:19:27 UTC (rev 2778)
@@ -1161,11 +1161,18 @@
.Fl a
option kills all but the pane given with
.Fl t .
-.It Ic kill-window Op Fl t Ar target-window
+.It Xo Ic kill-window
+.Op Fl a
+.Op Fl t Ar target-window
+.Xc
.D1 (alias: Ic killw )
Kill the current window or the window at
.Ar target-window ,
removing it from any sessions to which it is linked.
+The
+.Fl a
+option kills all but the window given with
+.Fl t .
.It Ic last-pane Op Fl t Ar target-window
.D1 (alias: Ic lastp )
Select the last (previously selected) pane.
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs