Age | Commit message (Collapse) | Author |
|
some modern features.
Now the common code is in mode-tree.c, which provides an API used by the
three modes now separated into window-{buffer,client,tree}.c. Buffer
mode shows buffers, client mode clients and tree mode a tree of
sessions, windows and panes.
Each mode has a common set of key bindings plus a few that are specific
to the mode. Other changes are:
- each mode has a preview pane: for buffers this is the buffer content
(very useful), for others it is a preview of the pane;
- items may be sorted in different ways ('O' key);
- multiple items may be tagged and an operation applied to all of them
(for example, to delete multiple buffers at once);
- in tree mode a command may be run on the selected item (session,
window, pane) or on tagged items (key ':');
- displayed items may be filtered in tree mode by using a format (this
is used to implement find-window) (key 'f');
- the custom format (-F) for the display is no longer available;
- shortcut keys change from 0-9, a-z, A-Z which was always a bit weird
with keys used for other uses to 0-9, M-a to M-z.
Now that the code is simpler, other improvements will come later.
Primary key bindings for each mode are documented under the commands in
the man page (choose-buffer, choose-client, choose-tree).
Parts written by Thomas Adam.
|
|
CMD_FIND_* flags in the cmd_entry and call it for the command. Commands
with special requirements call it themselves and update the target for
hooks to use.
|
|
rather than having it inside other functions. Should be no change to the
way targets are resolved just yet.
|
|
|
|
|
|
|
|
reported by Theo Buehler.
|
|
|
|
the same as normal searching but updates the cursor position and marked
search terms as you type. C-r and C-s in the prompt repeat the search,
once finished searching (with Enter), N and n work as before.
|
|
attach-session/switch-client, reported by Thomas Sattle.
|
|
created (which now is now a fatal() later).
|
|
for the prompts in copy mode. Fixes problems with jumping to ' reported
by Theo Buehler.
|
|
|
|
but there is also now a global command queue. Instead of command queues
being dispatched on demand from wherever the command happens to be
added, they are now all dispatched from the top level server
loop. Command queues may now also include callbacks as well as commands,
and items may be inserted after the current command as well as at the end.
This all makes command queues significantly more predictable and easier
to use, and avoids the complex multiple nested command queues used by
source-file, if-shell and friends.
A mass rename of struct cmdq to a better name (cmdq_item probably) is
coming.
|
|
- Prepare the state again before the "after" hooks are run, because the
command may have killed or moved windows.
- Use the hooks list from the newly prepared target, not the old hooks
list (only matters for new-session really).
- Correctly detect an invalid current state and ignore it in
cmd_find_target ("killw; swapw").
- Change neww, new, killp, killw, splitw, swapp, swapw to update the
current state (used if no explicit target is given) to something more
useful after they have finished. For example, neww changes it to the
newly created window.
Hooks are still relatively new and primitive so there are likely to be
more changes to come.
Parts based on bug reports from Uwe Werler and Iblis Lin.
|
|
|
|
key_bindings_unref_table.
|
|
replaced if we already know the current.
|
|
|
|
|
|
using an enum and simplify the parsing code.
|
|
about the order.
|
|
needed.
|
|
|
|
|
|
|
|
|
|
just wrappers around cmd_find_target) and just use cmd_find_target
directly.
|
|
|
|
the state (client, session, winlink, pane) for it it before entering the
command. Each command provides some flags that tell the prepare step
what it is expecting.
This is a requirement for having hooks on commands (for example, if you
hook "select-window -t1:2", the hook command should to operate on window
1:2 not whatever it thinks is the current window), and should allow some
other target improvements.
The old cmd_find_* functions remain for the moment but that layer will
be dropped later.
Joint work with Thomas Adam.
|
|
couple of not very useful client hooks. This will eventually let
commands be run at various points and on notifications. Joint work with
Thomas Adam.
|
|
|
|
|
|
consistent but with much less duplication, but keeping the same internal
API. Also adds more readable aliases for some of the special tokens used
in targets (eg "{start}" instead of "^"). Some behaviours may have
changed, for example prefix matches now happen before fnmatch.
|
|
|
|
|
|
|
|
named starting with numbers. From Thomas Adam.
|
|
options for "mouse-this" and "mouse-that", mouse events may be bound as
keys and there is one option "mouse" that turns on mouse support
entirely (set -g mouse on).
See the new MOUSE SUPPORT section of the man page for description of the
key names and new flags (-t= to specify the pane or window under mouse
as a target, and send-keys -M to pass through a mouse event).
The default builtin bindings for the mouse are:
bind -n MouseDown1Pane select-pane -t=; send-keys -M
bind -n MouseDown1Status select-window -t=
bind -n MouseDrag1Pane copy-mode -M
bind -n MouseDrag1Border resize-pane -M
To get the effect of turning mode-mouse off, do:
unbind -n MouseDrag1Pane
unbind -temacs-copy MouseDrag1Pane
The old mouse options are now gone, set-option -q may be used to
suppress warnings if mixing configuration files.
|
|
|
|
means session-of-%1 or window-of-%1) and window id as part of session
(so @1 means session-of-@1).
|
|
|
|
the other functions.
|
|
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.
|
|
|
|
|
|
|
|
attach. Based on a diff from J Raynor.
|
|
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.
|
|
|