Commit Graph

310 Commits

Author SHA1 Message Date
Thomas Adam ffb83d23e1 Merge branch 'obsd-master'
Conflicts:
	Makefile
2015-02-14 23:54:07 +00:00
nicm 1b2c62afe9 Entries in the window list can be NULL, prompted by a crash seen by Ben
Boeckel.
2015-02-09 12:47:18 +00:00
Thomas Adam 5f8138faf5 Merge branch 'obsd-master'
Conflicts:
	format.c
2014-12-19 19:22:19 +00:00
nicm 160e3e2be3 Notify on zoom/unzoom, from George Nachmann. 2014-12-15 10:04:18 +00:00
Nicholas Marriott 747cab4281 No need for $Id$ now. 2014-11-08 12:27:43 +00:00
Thomas Adam 35ffd093d7 Merge branch 'obsd-master'
Conflicts:
	Makefile
	cmd-link-window.c
	cmd-unlink-window.c
2014-10-29 12:51:21 +00:00
nicm a02c2e55c0 Only redraw pane when it has actually changed. 2014-10-21 22:22:04 +00:00
Thomas Adam 2874a431c0 Merge branch 'obsd-master' 2014-09-25 11:29:54 +01:00
nicm f518a077b1 Add flags to selectp to enable and disable input to a pane, from Anish
Athalye.
2014-08-11 22:14:30 +00:00
Thomas Adam a131b82e95 Merge branch 'obsd-master'
Conflicts:
	client.c
2014-08-09 20:31:36 +01:00
nicm 54782af616 Allow keys and send-keys to invisible panes, from saggy-kun at users dot
sf dot net.
2014-06-23 10:27:05 +00:00
Thomas Adam 814e40522c Merge branch 'obsd-master' 2014-06-20 12:59:43 +01:00
nicm 74becbfd6f Reset properly when c0-change-trigger is increased from zero so panes
don't get stuck.
2014-06-05 22:14:29 +00:00
Thomas Adam bae95844d7 Merge branch 'obsd-master'
Conflicts:
	format.c
	window.c
2014-05-13 21:58:48 +01:00
nicm b3e8d440ed 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.
2014-05-13 08:08:32 +00:00
nicm 540f0b3e45 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.
2014-05-08 06:03:30 +00:00
Thomas Adam 953c3ef47a Merge branch 'obsd-master'
Conflicts:
	Makefile
	tmux.1
	window.c
2014-04-23 11:26:11 +01:00
nicm a5d4b7f3d9 Some more long lines. 2014-04-17 14:45:49 +00:00
nicm 3e27be353d Set PATH explicitly, either from client or session
environment. Previously it came from the session environment. From J
Raynor.
2014-04-17 13:02:59 +00:00
nicm bce952777a Remove some unnecessary includes and fix a typo. 2014-04-17 11:38:35 +00:00
nicm 2e98c9057d 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.
2014-04-17 09:13:13 +00:00
nicm 992ef70fb6 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.
2014-04-17 07:36:45 +00:00
nicm 1704d4a6b7 Don't segfaut when the parent of the layout cell is NULL, from Thomas Adam. 2014-03-31 21:41:07 +00:00
Nicholas Marriott 78e783e786 Don't segfaut when the parent of the layout cell is NULL, from Thomas Adam. 2014-03-06 13:01:51 +00:00
Nicholas Marriott f3152079e1 I prefer . here not :. 2014-02-24 23:11:25 +00:00
Nicholas Marriott 4273c1b80e Use utempter to update utmp if it's around for configure, from madmaverick9 at
roxxmail dot eu.
2014-02-24 23:07:22 +00:00
Thomas Adam 150ef86800 Merge branch 'obsd-master' 2014-02-22 20:48:44 +00:00
nicm 315d45a0eb Fix crash due to uninitialized lastwp member of layout_cell, reported by
Balazs Kezes.
2014-02-22 18:01:10 +00:00
Thomas Adam d50e47fc4a Merge branch 'obsd-master'
Conflicts:
	Makefile
	cmd-server-info.c
	cmd-start-server.c
2014-01-31 21:39:56 +00:00
nicm 945339b443 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.
2014-01-28 23:07:09 +00:00
nicm c930fd5ff6 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.
2014-01-28 22:19:17 +00:00
nicm 282c5f9644 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.
2013-10-10 12:26:34 +00:00
nicm 90ae7682ed 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.
2013-10-10 11:59:23 +00:00
Nicholas Marriott 4538c269d0 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 '#{pane_current_path}'

The equivalent of default-path '~' is left as an exercise for the reader.

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.
2013-10-06 21:02:23 +01:00
Thomas c103f2fbcb 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 therfore introduces WINDOW_ALERTFLAGS to help with this.
2013-08-20 13:03:53 +01:00
Thomas 399a15b9fc Merge branch 'obsd-master' 2013-03-26 16:59:37 +00:00
Nicholas Marriott 771d7db3a6 Fix compiler warnings, missing #include. From Thomas Adam. 2013-03-26 10:54:48 +00:00
Thomas 00af2df102 Merge branch 'obsd-master' 2013-03-25 16:30:37 +00:00
Nicholas Marriott e44bd9f750 Revert the command-prefix change which breaks sequences of commands. 2013-03-25 15:59:57 +00:00
Nicholas Marriott 58bb6f8c56 Set pane resize flag when needed. 2013-03-25 11:55:01 +00:00
Nicholas Marriott 114d822d27 Don't zoom windows with one pane, from Romain Francoise. 2013-03-25 11:39:11 +00:00
Nicholas Marriott c71844de63 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.
2013-03-24 09:57:59 +00:00
Nicholas Marriott 3eae71b5b2 Do pane resize ioctls once at the end of the server loop rather than
immediately.
2013-03-24 09:25:04 +00:00
Nicholas Marriott 8d59b189cc No more lint means no more ARGSUSED. 2013-03-22 10:31:22 +00:00
Nicholas Marriott 8aa40ec1c7 Don't zoom windows with one pane, from Romain Francoise. 2013-03-12 12:18:52 +00:00
Nicholas Marriott c5239c5984 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.
2013-02-24 00:25:03 +00:00
Nicholas Marriott dbd8e47846 Do pane resize ioctls once at the end of the server loop rather than
immediately.
2013-02-22 21:35:29 +00:00
Nicholas Marriott 31407b70e0 Add option command-prefix which is automatically prepended to any command
(apart from a naked default-shell). The default is "exec ".
2013-02-22 14:31:38 +00:00
Nicholas Marriott 9d165df18a No more lint means no more ARGSUSED. 2013-02-17 23:15:38 +00:00
Thomas Adam 64da762c15 Merge branch 'obsd-master' 2013-02-07 12:08:55 +00:00