Commit Graph

1418 Commits

Author SHA1 Message Date
Nicholas Marriott
04b32fa734 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@.
2011-01-01 01:12:09 +00:00
Nicholas Marriott
91218f8714 Remove unused variable. 2011-01-01 00:44:24 +00:00
Jason McIntyre
1a1efd5bc9 fix trailing whitespace; 2010-12-31 00:41:11 +00:00
Nicholas Marriott
4fb1045f5a Remove some unused defines. 2010-12-30 23:20:13 +00:00
Nicholas Marriott
2b3c2fd852 Fix BUFFERS section now they are global. 2010-12-30 23:17:41 +00:00
Nicholas Marriott
cc42614fa9 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.
2010-12-30 23:16:18 +00:00
Nicholas Marriott
2231e72968 Add a function to create window flags rather than doing the same thing
in two places. From Thomas Adam.
2010-12-30 21:35:17 +00:00
Nicholas Marriott
f7c42c21ba Support all four of the xterm mouse modes. Based on a diff from hsim at
gmx.li.
2010-12-29 21:49:06 +00:00
Nicholas Marriott
230e39ec35 Allow the config file parser and source-file to return "don't exit" to
the client to let attach work from configuration files.
2010-12-29 21:28:32 +00:00
Jason McIntyre
efa8c93664 tweak previous; 2010-12-27 19:57:31 +00:00
Nicholas Marriott
3e0bc052e1 Add a missing .Pp and sort options alphabetically, from Tiago Cunha. 2010-12-27 18:22:25 +00:00
Nicholas Marriott
d3d25365f1 server_kill_window can modify the RB tree so don't use RB_FOREACH, fixes
crash seen by Dan Harnett.
2010-12-23 21:56:38 +00:00
Nicholas Marriott
6fd2b5b87f Style tweaks. 2010-12-23 20:18:39 +00:00
Nicholas Marriott
acf13ce978 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.
2010-12-21 22:37:59 +00:00
Nicholas Marriott
1b8488ee75 Fix another stray addition that was too early. Oops. 2010-12-20 01:28:18 +00:00
Nicholas Marriott
6fcdc714b6 Undo a change to next/previous session that got mixed in prematurely. 2010-12-20 00:43:24 +00:00
Nicholas Marriott
8705c6b435 Dead sessions are never on the active sessions list, so the SESSION_DEAD
flag is effectively unused. Remove it.
2010-12-20 00:19:20 +00:00
Nicholas Marriott
9358cfaf4a Use pointer rather than index for the client's last session. 2010-12-20 00:17:22 +00:00
Nicholas Marriott
a51dcdc430 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.
2010-12-20 00:03:55 +00:00
Nicholas Marriott
c65d4220f0 Don't nuke the index counter when a session group comes up. 2010-12-19 22:35:54 +00:00
Nicholas Marriott
c198664d15 Add other-pane-height and other-pane-width options, allowing the width
or height of the smaller panes in the main-horizontal and main-vertical
layouts to be set. Mostly from David Goodlad.
2010-12-19 18:35:08 +00:00
Nicholas Marriott
8715247a43 Read ${X} environment variables in strings and $HOME from the global
environment rather than getenv, this allows them to be updated during
the configuration file.
2010-12-13 22:53:14 +00:00
Nicholas Marriott
51487ed22f 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.
2010-12-11 18:39:25 +00:00
Nicholas Marriott
20ed20ea1e Fix rectangle copy to behave like emacs - the cursor is not part of the
selection on the right edge but on the left it is.
2010-12-11 17:56:01 +00:00
Nicholas Marriott
9802fea615 Oops, these functions return a const char *, so make the local variable
const as well.
2010-12-11 16:13:15 +00:00
Nicholas Marriott
7ce77ffc9c Make the prompt history global for all clients which is much more useful than per-client history. 2010-12-11 16:05:57 +00:00
Nicholas Marriott
6be32c89c5 Rephrase a confusing sentence. 2010-12-10 21:01:38 +00:00
Nicholas Marriott
1f18523565 In the built-in layouts, distribute the panes more evenly. Set the
default value of main-pane-width to 80, rather than 81. By Micah Cowan.
2010-12-08 19:57:03 +00:00
Nicholas Marriott
e26a351865 Add an option to alert (monitor) for silence (lack of activity) in a
window. From Thomas Adam.
2010-12-06 22:51:02 +00:00
Nicholas Marriott
ebd0eb4fb4 If VISUAL or EDITOR contains "vi", configure mode-keys and status-keys
to vi.

Based on a diff from martynas@, previously requested by a couple of
other people.
2010-11-29 19:45:58 +00:00
Nicholas Marriott
ef9b2eb566 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.
2010-11-22 21:13:13 +00:00
Nicholas Marriott
9a1b4f9ed3 Show more window and pane flags in list-* output, and put layout on the
same line.
2010-11-15 06:52:11 +00:00
Nicholas Marriott
7e542d119b Update man page for update-environment. 2010-11-14 09:04:22 +00:00
Nicholas Marriott
503edae26f Don't allow last and active window to become the same - a very bad move
when the active window is closed and freed. Reported by sthen@.
2010-11-14 08:58:25 +00:00
Nicholas Marriott
e4e728664b Add XAUTHORITY to update-environment, requested by Andreas Kloeckner. 2010-11-11 21:06:09 +00:00
Nicholas Marriott
17b56562c4 Flag to flush all key bindings from Rob Paisley. 2010-11-11 20:54:06 +00:00
Nicholas Marriott
c7fccfa299 Declaration in header should be extern. 2010-11-11 20:51:30 +00:00
Nicholas Marriott
023137a891 Typo, from Rob Paisley. 2010-11-01 20:59:45 +00:00
Nicholas Marriott
34d05ea7cd 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@.
2010-10-29 20:11:57 +00:00
Nicholas Marriott
5de84eca3d Add a last-pane command (bound to ; by default). Requested ages ago by
somebody whose name I have forgotten.
2010-10-23 13:04:34 +00:00
Nicholas Marriott
a3efd2ab5a When removing a pane, don't change the active pane unless the active
pane is actually the one being removed.
2010-10-23 12:51:51 +00:00
Nicholas Marriott
139754b9fe Mark repeating keys with "(repeat)" in the key list. 2010-10-20 18:20:36 +00:00
Nicholas Marriott
248fb14f08 Merge the before and after attach client code into one in client.c
(instead of two in tmux.c and client.c).
2010-10-18 20:00:02 +00:00
Nicholas Marriott
31954339d1 Make stdio blocking again before calling shell command with -c. 2010-10-16 08:42:35 +00:00
Nicholas Marriott
f56b4ec2ff Trying to set FD_CLOEXEC on every fd is a lost cause, just use
closefrom() before exec.
2010-10-16 08:31:55 +00:00
Nicholas Marriott
6c42f1a89e Fall back on normal session choice method if $TMUX exists but is invalid
rather than rejecting.
2010-10-16 07:57:42 +00:00
Nicholas Marriott
65ff5b00bd Use an explicit event rather than event_once for the main event so it
can be removed when the client becomes ready.
2010-10-14 17:38:39 +00:00
Nicholas Marriott
f6cd0342f6 Treat the meta bit in the xterm extended modifier key set as the same as
escape (tmux's meta). From Emanuele Giaquinta.
2010-10-14 00:37:51 +00:00
Nicholas Marriott
1580afdfdf Put "or" on new line from command with .Ic. 2010-10-14 00:30:03 +00:00
Nicholas Marriott
7aef2994e4 Set cause when failing due to linking a window to itself, from Martin
Pieuchot.
2010-10-09 12:58:00 +00:00