#
765b9a58 |
| 16-Oct-2016 |
nicm <nicm@openbsd.org> |
Rewrite command queue handling. Each client still has a command queue, but there is also now a global command queue. Instead of command queues being dispatched on demand from wherever the command hap
Rewrite command queue handling. Each client still has a command queue, 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.
show more ...
|
#
10b426e0 |
| 15-Oct-2016 |
nicm <nicm@openbsd.org> |
Drain notifys once at the end of the server loop instead of doing it from the end of every command queue (which could be nested).
|
#
9a67a5ac |
| 14-Oct-2016 |
nicm <nicm@openbsd.org> |
source-file and some other commands can recurse back into cmdq_continue, which could potentially free the currently running command, so we need to take a reference to it in cmdq_continue_one.
Fixes
source-file and some other commands can recurse back into cmdq_continue, which could potentially free the currently running command, so we need to take a reference to it in cmdq_continue_one.
Fixes problem reported by Theo Buehler.
show more ...
|
#
45436ca5 |
| 13-Oct-2016 |
nicm <nicm@openbsd.org> |
Trying to do hooks generically is way too complicated and unreliable and confusing, particularly trying to automatically figure out what target hooks should be using. So simplify it:
- drop before h
Trying to do hooks generically is way too complicated and unreliable and confusing, particularly trying to automatically figure out what target hooks should be using. So simplify it:
- drop before hooks entirely, they don't seem to be very useful;
- commands with special requirements now fire their own after hook (for example, if they change session or window, or if they have -t and -s and need to choose which one the hook uses as current target);
- commands with no special requirements can have the CMD_AFTERHOOK flag added and they will use the -t state.
At the moment new-session, new-window, split-window fire their own hook, and display-message uses the flag. The remaining commands still need to be looked at.
show more ...
|
#
788e192f |
| 13-Oct-2016 |
nicm <nicm@openbsd.org> |
Some improvements and bug fixes for hooks:
- 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 pr
Some improvements and bug fixes for hooks:
- 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.
show more ...
|
#
ced21769 |
| 11-Oct-2016 |
nicm <nicm@openbsd.org> |
Add static in window-*.c and move some internal functions out of tmux.h.
|
#
543b06d2 |
| 28-Sep-2016 |
nicm <nicm@openbsd.org> |
Couple of vasprintf -> xvasprintf.
|
#
39ed82a7 |
| 29-Apr-2016 |
nicm <nicm@openbsd.org> |
Final parts of command hooks, add before- and after- hooks to each command.
|
#
dead13bb |
| 19-Jan-2016 |
nicm <nicm@openbsd.org> |
Split out getting the current state from the target search so it can be replaced if we already know the current.
|
#
98ca8272 |
| 19-Jan-2016 |
nicm <nicm@openbsd.org> |
I no longer use my SourceForge address so replace it.
|
#
4fc586aa |
| 16-Dec-2015 |
nicm <nicm@openbsd.org> |
Add infrastructure to work out the best target given a pane or window alone and use it to add pane_died and pane_exited hooks.
|
#
59790f9e |
| 13-Dec-2015 |
nicm <nicm@openbsd.org> |
If command returns error, report it.
|
#
3447b427 |
| 13-Dec-2015 |
nicm <nicm@openbsd.org> |
Instead of every command resolving the target (-t or -s) itself, prepare the state (client, session, winlink, pane) for it it before entering the command. Each command provides some flags that tell t
Instead of every command resolving the target (-t or -s) itself, prepare 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.
show more ...
|
#
8ae71cbb |
| 27-Nov-2015 |
nicm <nicm@openbsd.org> |
Do not set a limit on the length of commands when printing them.
|
#
eb843181 |
| 14-Nov-2015 |
nicm <nicm@openbsd.org> |
Push stdout and stderr to clients more aggressively, and add an event to continue if the send fails.
|
#
62f1fdfd |
| 12-Nov-2015 |
nicm <nicm@openbsd.org> |
If we know the terminal outside tmux is not UTF-8, replace UTF-8 in error messages and whatnot with underscores the same as we do when we draw UTF-8 characters as part of the screen.
|
#
7ad4d2cc |
| 20-Oct-2015 |
nicm <nicm@openbsd.org> |
Use client pointer not file descriptor in logging.
|
#
8a30dcad |
| 16-Sep-2015 |
nicm <nicm@openbsd.org> |
Log when cmdq_continue is called.
|
#
722808c8 |
| 16-Sep-2015 |
nicm <nicm@openbsd.org> |
Rename cmd_q dead flag to a general flags bitmask (will be more flags later).
|
#
76851227 |
| 17-Jun-2015 |
nicm <nicm@openbsd.org> |
Break cmdq_continue inner loop into a helper function.
|
#
e048bb79 |
| 19-Apr-2015 |
nicm <nicm@openbsd.org> |
Rewrite of tmux mouse support which was a mess. Instead of having options for "mouse-this" and "mouse-that", mouse events may be bound as keys and there is one option "mouse" that turns on mouse supp
Rewrite of tmux mouse support which was a mess. Instead of having 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.
show more ...
|
#
f3cceb5b |
| 12-Feb-2015 |
nicm <nicm@openbsd.org> |
Take a reference to prevent cmdq being freed during the command. Can happen to cfg_cmd_q (possibly others) when source-file recurses into cmdq_continue. Fixes bug reported by Ismail Donmez and Theo B
Take a reference to prevent cmdq being freed during the command. Can happen to cfg_cmd_q (possibly others) when source-file recurses into cmdq_continue. Fixes bug reported by Ismail Donmez and Theo Buehler.
show more ...
|
#
413cc750 |
| 05-Feb-2015 |
nicm <nicm@openbsd.org> |
There is no need to save the guard state because the function checks it again anyway.
|
#
ffa87c31 |
| 27-Oct-2014 |
nicm <nicm@openbsd.org> |
Move cfg_causes local into cfg.c and remove struct causelist.
|
#
a236dc56 |
| 21-Oct-2014 |
nicm <nicm@openbsd.org> |
Save next item after firing command in case it has added to the queue.
|