Commit Graph

422 Commits (877bdb46ed91580a3a4c430bc8c550314301352a)

Author SHA1 Message Date
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 871b83cbab Remove a leftover prototype and fix some spacing. 2014-04-16 21:16:19 +00:00
nicm 14a96df9ee Remove the choose-list command to prepare for some later choose-* work. 2014-04-16 21:02:41 +00:00
nicm acef311fe3 Work out mouse scroll wheel effect when the mouse is first detected and
store it in struct mouse_event, reduce the scroll size the 3 but allow
shift to reduce it to 1 and meta and ctrl to multiply by 3 if the
terminal supports them, also support wheel in choose mode. From Marcel
Partap.
2014-04-03 08:20:29 +00:00
nicm 252a7373d6 Support UTF-8 with choose-buffer, from Kosuke ASAMI. Also make
buffer_sample bigger to let it trim at window right edge.
2014-04-02 18:12:18 +00:00
deraadt d9960b2d4d missed commit matching log.c 2014-04-01 05:50:30 +00:00
nicm 7bdb675469 GRID_DEBUG is no longer needed. 2014-03-31 21:42:27 +00:00
nicm f155316be7 Remove unused log functions. 2014-03-31 21:42:05 +00:00
nicm 46593e7aa2 Add names for mouse button bits rather than using magic numbers, from
Marcel Partap.
2014-03-31 21:40:21 +00:00
nicm fcdae6925a Use hex constants rather than shifts for mouse events and flags, pointed
out by Marcel Partap.
2014-03-31 21:39:59 +00:00
nicm 0e4d1d8493 Add setb -a to append and a copy mode append command, from J Raynor with
minor changes.
2014-03-31 21:39:31 +00:00
nicm b11de5adc7 Make session_attached a count and add session_many_attached flag. 2014-03-31 21:37:55 +00:00
nicm 9368914ee7 Add start-of-list, end-of-list, top-line and bottom-line in choice mode,
from madmaverick9 at roxxmail dot eu, similar diff a few days later from
Marcel Partap.
2014-03-31 21:36:43 +00:00
nicm 175f215187 Having three *clock* files is ridiculous, remove clock.c. 2014-03-31 21:34:08 +00:00
nicm f1828921df Change terminal-overrides to a server option (now that we have them), it
doesn't make much sense as a session option.
2014-02-23 00:53:06 +00:00
nicm 9f02feb9d0 Break up and simplify screen_redraw_screen. 2014-01-31 14:19:24 +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 1a0d3cd5d3 Allow attach-session -t to accept a window and pane to select them on
attach. Based on a diff from J Raynor.
2014-01-09 14:20:55 +00:00
nicm 7fa55b0419 Key to swap to other end of selection (bound to o with vi keys), from J
Raynor.
2013-10-23 11:31:03 +00:00
nicm bf35441608 Do not run any command line command from the client which starts the
server until after the configuration file completes. This prevents it
racing against run-shell or if-shell in .tmux.conf that run in the
background.
2013-10-20 17:28:43 +00:00
nicm d0566a474a Remove the KERN_PROC_CWD the proc_current_path format (which is the only
thing that uses it now).
2013-10-10 12:39:24 +00:00
nicm c1ccefc62d We accidentally haven't been using $TMUX to work out the session for a
while and in fact it is less useful that using the client ttyname. So
don't bother and don't pass it from the client. If we need it in future
it is in c->environ.
2013-10-10 12:29:35 +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 10c38436aa Similarly for MSG_COMMAND - allow full imsg limit not arbitrary 2048. 2013-10-10 12:13:56 +00:00
nicm 6c093010e0 Remove CMD_SENDENVIRON. 2013-10-10 12:09:34 +00:00
nicm 4c9f41f1ad Pass flags into cmdq_guard as an argument since sometimes cmdq->cmd can
be NULL. Avoids crash when a command in a command client can't be
parsed.
2013-10-10 11:45:28 +00:00
Nicholas Marriott f884fff869 Implement s, S, C mode switch commands in vi(1) mode, from Ben Boeckel. 2013-07-05 14:38:23 +00:00
Nicholas Marriott 3977dba761 Focus events can cause trouble if left on and they can't be turned off
during idle periods (like the other states are) because we'd miss
events. So add a server option to control them. Defaults to off.
2013-06-23 13:10:46 +00:00
Nicholas Marriott 13441e8cb8 The actual terminfo entries we ended up with for cursor changes are Cs,
Ce, Ss and Se (not Cc, Ce, Cs, Csr). So use and document these instead
of the ones we were using earlier.
2013-06-02 07:52:15 +00:00
Nicholas Marriott a0cf65db77 Instead of eating 1024 bytes or so for the arguments of each command,
save memory by using an RB tree. From Tiago Cunha.
2013-05-31 12:19:34 +00:00
Nicholas Marriott e323101ede Rename global configuration define. 2013-04-24 10:01:32 +00:00
Nicholas Marriott 3d2b7d5bce When using choose-tree -u, start with the current window
highlighted. From Thomas Adam.
2013-04-22 22:17:29 +00:00
Nicholas Marriott 982354765b Remove tmux's (already minimal) 88 colour support. Such terminals are
few and unnecessary.
2013-03-27 11:17:12 +00:00
Nicholas Marriott 43fb9835fa Add -P and -F to new-session. 2013-03-25 11:44:00 +00:00
Nicholas Marriott 6fee3e9e4b Rename session idx to session id throughout and add $ prefix to targets
to use it, extended from a diff from George Nachman.
2013-03-25 10:11:45 +00:00
Nicholas Marriott 410a3abbef Add a wait-for command which blocks a client on a named channel until it
is woken up again (with wait-for -S). From Thiago Padilha.
2013-03-25 10:09:05 +00:00
Nicholas Marriott 14fad6a5cc Add -A flag to new-session to make it behave like attach-session if the
session exists. If -A is used, -D behaves like -d to attach-session.
2013-03-24 09:58:40 +00:00
Nicholas Marriott 20636d956d Add a command queue to standardize and simplify commands that call other
commands and allow a command to block execution of subsequent
commands. This allows run-shell and if-shell to be synchronous which has
been much requested.

Each client has a default command queue and commands are consumed one at
a time from it. A command may suspend execution from the queue by
returning CMD_RETURN_WAIT and then resume it by calling cmd_continue() -
for example run-shell does this from the callback that is fired after
the job is freed.

When the command queue becomes empty, command clients are automatically
exited (unless attaching). A callback is also fired - this is used for
nested commands in, for example, if-shell which can block execution of
the client's cmdq until a new cmdq becomes empty.

Also merge all the old error/info/print functions together and lose the
old curclient/cmdclient distinction - a cmdq is bound to one client (or
none if in the configuration file), this is a command client if
c->session is NULL otherwise an attached client.
2013-03-24 09:54:10 +00:00
Nicholas Marriott a60687f9ba Handle focus events from the terminal, from Aaron Jensen. 2013-03-24 09:28:59 +00:00
Nicholas Marriott eaaeb28cda Add session_set_current helper function, extracted from a diff from
Aaron Jensen.
2013-03-22 16:00:26 +00:00
Nicholas Marriott 8478895eeb Add -e flag to capture-pane to include embedded ANSI SGR escape
sequences, from George Nachman.
2013-03-22 15:51:54 +00:00
Nicholas Marriott db66d85176 Fix double space in sessions template. 2013-03-22 10:38:13 +00:00
Nicholas Marriott f0efa576e0 Add resize-pane -x and -y for absolute pane size (much requested). 2013-03-22 10:37:39 +00:00
Nicholas Marriott 67b4d5b609 Support the latest theory for mouse input, this is enabled/disabled with
SM/RM 1006 and is similar in style to SGR input: \033[<b;x;yM or
\033[b;x;ym. From Egmont Koblinger.
2013-03-22 10:33:50 +00:00
Nicholas Marriott 10682b9e7e Instead of loads of little screen_write_*_on and off functions which
just change mode flags, just have screen_write_mode_set and
screen_write_mode_clear.
2013-03-21 18:47:56 +00:00
Nicholas Marriott 3665be7c44 Tidy by splitting default key tables into two. 2013-03-21 16:50:22 +00:00
Nicholas Marriott c982279950 Fix constness of cmd_template_replace, window_choose_add_item and
window_choose_add_window.
2013-03-21 16:19:25 +00:00
Nicholas Marriott 180faf73af Allow choose commands to be used outside tmux, so long as at least one
client is attached.
2013-03-21 16:09:59 +00:00
Nicholas Marriott 8903c1f167 Automatically reflow wrapped lines when a pane is resized, requested by
many over the years and finally implemented by Richard Woodbury.
2013-02-05 11:08:59 +00:00