summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-queue.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Instead of every command resolving the target (-t or -s) itself, preparenicm2015-12-131-12/+15
| | | | | | | | | | | | | | | | 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.
* Do not set a limit on the length of commands when printing them.nicm2015-11-271-4/+5
|
* Push stdout and stderr to clients more aggressively, and add an event tonicm2015-11-141-4/+4
| | | | continue if the send fails.
* If we know the terminal outside tmux is not UTF-8, replace UTF-8 innicm2015-11-121-4/+17
| | | | | error messages and whatnot with underscores the same as we do when we draw UTF-8 characters as part of the screen.
* Use client pointer not file descriptor in logging.nicm2015-10-201-3/+3
|
* Log when cmdq_continue is called.nicm2015-09-161-1/+5
|
* Rename cmd_q dead flag to a general flags bitmask (will be more flags later).nicm2015-09-161-4/+7
|
* Break cmdq_continue inner loop into a helper function.nicm2015-06-171-21/+31
|
* Rewrite of tmux mouse support which was a mess. Instead of havingnicm2015-04-191-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Take a reference to prevent cmdq being freed during the command. Cannicm2015-02-121-2/+5
| | | | | happen to cfg_cmd_q (possibly others) when source-file recurses into cmdq_continue. Fixes bug reported by Ismail Donmez and Theo Buehler.
* There is no need to save the guard state because the function checks itnicm2015-02-051-15/+10
| | | | again anyway.
* Move cfg_causes local into cfg.c and remove struct causelist.nicm2014-10-271-6/+5
|
* Save next item after firing command in case it has added to the queue.nicm2014-10-211-3/+2
|
* Better format for printf format attributes.nicm2014-10-201-3/+3
|
* Various minor style and spacing nits.nicm2014-09-011-4/+4
|
* Remove the "info" message mechanism, this was only used for about fivenicm2014-04-171-32/+1
| | | | | | mostly useless and annoying messages. Change those commands to silence on success like all the others. Still accept the -q command line flag and "quiet" server option for now.
* Remove unnecessary calls to va_start/va_end, from Tiago Cunha.nicm2014-01-091-5/+1
|
* Alter how tmux handles the working directory to internally use filenicm2013-10-101-25/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* retcode -> retval for exit message.nicm2013-10-101-2/+2
|
* Support -c for new-session, based on code from J Raynor.nicm2013-10-101-1/+25
|
* Make cmdq->client_exit a tristate (-1 means "not set") so that ifnicm2013-10-101-3/+3
| | | | | explicitly set it can be copied from child to parent cmdq by if-shell and source-file. This fixes using attach or new. From Chris Johnsen.
* Pass flags into cmdq_guard as an argument since sometimes cmdq->cmd cannicm2013-10-101-9/+9
| | | | | be NULL. Avoids crash when a command in a command client can't be parsed.
* Mark control commands specially so the client can identify them, basednicm2013-06-231-3/+6
| | | | on a diff from George Nachman a while back.
* Fix bug where end guard in control mode was not printed after sessionnicm2013-04-101-2/+2
| | | | destroyed, from George Nachman.
* Fix compiler warnings, missing #include. From Thomas Adam.nicm2013-03-261-1/+2
|
* Only send end guard if begin was sent, from George Nachman.nicm2013-03-251-10/+13
|
* Fix a warning.nicm2013-03-251-2/+2
|
* Add time and a command count to control mode guards, based on code fromnicm2013-03-251-15/+26
| | | | George Nachman.
* Add some additional debug logging.nicm2013-03-251-1/+6
|
* Print %%error not %%end guard on error, from George Nachman.nicm2013-03-251-3/+7
|
* Add a command queue to standardize and simplify commands that call othernicm2013-03-241-0/+258
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.