diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-03-21 12:44:06 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-03-21 12:44:06 +0000 |
commit | f5f04a9344df329459b48904f20601e3b0013a7c (patch) | |
tree | 8e76cc171e5a4f490d62a90d5bcbc1837e4335b9 | |
parent | 7398241e58c869ec04b5bf94db6bf915c77bc703 (diff) | |
download | rtmux-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-- | CHANGES | 10 | ||||
-rw-r--r-- | TODO | 8 | ||||
-rw-r--r-- | cmd-set-option.c | 3 | ||||
-rw-r--r-- | session.c | 5 | ||||
-rw-r--r-- | tmux.c | 3 | ||||
-rw-r--r-- | tmux.h | 4 |
6 files changed, 23 insertions, 10 deletions
@@ -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 @@ -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 }, @@ -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)); } @@ -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); @@ -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 |