aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-03-21 12:44:06 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-03-21 12:44:06 +0000
commitf5f04a9344df329459b48904f20601e3b0013a7c (patch)
tree8e76cc171e5a4f490d62a90d5bcbc1837e4335b9
parent7398241e58c869ec04b5bf94db6bf915c77bc703 (diff)
downloadrtmux-f5f04a9344df329459b48904f20601e3b0013a7c.tar.gz
rtmux-f5f04a9344df329459b48904f20601e3b0013a7c.tar.bz2
rtmux-f5f04a9344df329459b48904f20601e3b0013a7c.zip
* New session flag "set-remain-on-exit" to set remain-on-exit flag for new windows created in that session (like "remain-by-default" used to do). Not perfectly happy about this, but until I can think of a good way to introduce it generically (maybe a set of options in the session) this will do. Fixes SF request 2527847.
-rw-r--r--CHANGES10
-rw-r--r--TODO8
-rw-r--r--cmd-set-option.c3
-rw-r--r--session.c5
-rw-r--r--tmux.c3
-rw-r--r--tmux.h4
6 files changed, 23 insertions, 10 deletions
diff --git a/CHANGES b/CHANGES
index 3cd5643d..3878ebff 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,11 @@
+21 March 2009
+
+* New session flag "set-remain-on-exit" to set remain-on-exit flag for new
+ windows created in that session (like "remain-by-default" used to do). Not
+ perfectly happy about this, but until I can think of a good way to introduce
+ it generically (maybe a set of options in the session) this will do. Fixes
+ SF request 2527847.
+
07 March 2009
* Support for 88 colour terminals.
@@ -1124,7 +1132,7 @@
(including mutt, emacs). No status bar yet and no key remapping or other
customisation.
-$Id: CHANGES,v 1.258 2009-03-07 10:29:06 nicm Exp $
+$Id: CHANGES,v 1.259 2009-03-21 12:44:05 nicm Exp $
LocalWords: showw utf UTF fulvio ciriaco joshe OSC APC gettime abc DEF OA clr
LocalWords: rivo nurges lscm Erdely eol smysession mysession ek dstname RB ms
diff --git a/TODO b/TODO
index 9858e5cf..c47348c4 100644
--- a/TODO
+++ b/TODO
@@ -75,22 +75,22 @@
and n of width 0, then translate cursor indexes on-the-fly would need to
adjust all cursor movement and also handle different width lines properly.
- support other mouse modes (highlight etc) and use it in copy mode
+- set-remain-on-exit is a bit of a hack, some way to do it generically?
+- set-option should be set-session-option and should be overall global options
+ for stuff like mode keys?
(hopefully) for 0.8, in no particular order:
- key to switch to copy mode from scroll mode
- attach should have a flag to create session if it doesn't exist
- swap-pane-up, swap-pane-down (maybe move-pane-*)
-- some fix for SF feature request 2527847 - now remain-by-default has gone
- cannot control it per-session
- clear window title on exit
- might be nice if attach-session behaved like switch-client inside an
existing client
- test bug sshing from freebsd console
- better support for stupid margin terminals. strcmp for cons25 sucks, how can
these be autodetected?
-- set-option should be set-session-option and should be overall global options
- for stuff like mode keys?
- document status-keys
- document break-pane
- document -8 flag
+- document set-remain-on-exit
- refer to windows by name etc (duplicates? fnmatch?)
diff --git a/cmd-set-option.c b/cmd-set-option.c
index 627a1205..e26ede1e 100644
--- a/cmd-set-option.c
+++ b/cmd-set-option.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-set-option.c,v 1.59 2009-02-13 21:39:45 nicm Exp $ */
+/* $Id: cmd-set-option.c,v 1.60 2009-03-21 12:44:06 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -61,6 +61,7 @@ const struct set_option_entry set_option_table[NSETOPTION] = {
{ "message-fg", SET_OPTION_COLOUR, 0, 0, NULL },
{ "prefix", SET_OPTION_KEY, 0, 0, NULL },
{ "repeat-time", SET_OPTION_NUMBER, 0, SHRT_MAX, NULL },
+ { "set-remain-on-exit", SET_OPTION_FLAG, 0, 0, NULL },
{ "set-titles", SET_OPTION_FLAG, 0, 0, NULL },
{ "status", SET_OPTION_FLAG, 0, 0, NULL },
{ "status-attr", SET_OPTION_ATTRIBUTES, 0, 0, NULL },
diff --git a/session.c b/session.c
index ecfc4bb3..317d8ce6 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
-/* $Id: session.c,v 1.54 2009-03-07 10:11:20 nicm Exp $ */
+/* $Id: session.c,v 1.55 2009-03-21 12:44:06 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -210,6 +210,9 @@ session_new(struct session *s,
if (w == NULL)
return (NULL);
+ if (options_get_number(&s->options, "set-remain-on-exit"))
+ options_set_number(&w->options, "remain-on-exit", 1);
+
return (session_attach(s, w, idx, cause));
}
diff --git a/tmux.c b/tmux.c
index 4e362aa5..9bb33975 100644
--- a/tmux.c
+++ b/tmux.c
@@ -1,4 +1,4 @@
-/* $Id: tmux.c,v 1.108 2009-03-07 10:29:06 nicm Exp $ */
+/* $Id: tmux.c,v 1.109 2009-03-21 12:44:06 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -247,6 +247,7 @@ main(int argc, char **argv)
options_set_number(&global_options, "repeat-time", 500);
options_set_number(&global_options, "set-titles", 1);
options_set_number(&global_options, "lock-after-time", 0);
+ options_set_number(&global_options, "set-remain-on-exit", 0);
options_set_number(&global_options, "status", 1);
options_set_number(&global_options, "status-bg", 2);
options_set_number(&global_options, "status-fg", 0);
diff --git a/tmux.h b/tmux.h
index 8544f828..4799aac0 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1,4 +1,4 @@
-/* $Id: tmux.h,v 1.279 2009-03-07 10:29:06 nicm Exp $ */
+/* $Id: tmux.h,v 1.280 2009-03-21 12:44:06 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -969,7 +969,7 @@ struct set_option_entry {
};
extern const struct set_option_entry set_option_table[];
extern const struct set_option_entry set_window_option_table[];
-#define NSETOPTION 23
+#define NSETOPTION 24
#define NSETWINDOWOPTION 17
#ifdef NO_STRTONUM