aboutsummaryrefslogtreecommitdiff
path: root/cmd-find.c
Commit message (Collapse)AuthorAge
* Add a client flag 'active-pane' which stores the active pane in thenicm2020-05-16
| | | | | | | | | client and allows it to be changed independently from the real active pane stored in the window. This is can be used with session groups which allow an independent current window (although it would be nice to have a flag for this too and remove session groups). The client active pane is only really useful interactively, many things (hooks, window-style, zooming) still use the window active pane.
* Move cmdq_state into cmd-queue.c.nicm2020-04-13
|
* Rename cmdq_shared to cmdq_state which will better reflect what it isnicm2020-04-13
| | | | (going to be) used for.
* Store a key event not a mouse event in the shared data.nicm2020-04-13
|
* Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make itsnicm2020-04-13
| | | | use more clearly defined and preparation for some future work).
* Do not try to use the client if the item containing it is NULL.nicm2020-04-09
|
* Do not use $TMUX to find the session because for windows in multiplenicm2019-06-12
| | | | | | sessions it is wrong as often as it is right, and for windows in one session it is pointless. Instead check TMUX_PANE to find the pane and look for the MRU session as usual. GitHub issue 1793.
* Adjust how mouse targets are found so they always have a session, windownicm2019-05-08
| | | | and pane.
* Add a : to make error messages clearer.nicm2019-03-15
|
* When asked for a window index, return it even if the window exists.nicm2019-03-12
|
* Tweak target debug logging.nicm2019-03-12
|
* SESSION_UNATTACHED flag is no longer necessary now we have an attachednicm2018-08-18
| | | | count instead.
* Make key trees and some other bits static.nicm2018-08-02
|
* Style nit.nicm2018-06-26
|
* When looking for panes, ignore dead ones (with -1 filenicm2018-05-28
| | | | descriptor). GitHub issue 1354.
* Another check for NULL window if looking for index.nicm2018-05-09
|
* Improve logging of sessions.nicm2018-05-04
|
* Use window target if specified and exists even when looking for annicm2018-05-03
| | | | index, fixes neww -a with -t as well.
* Change how display-message uses the client. Originally it was onlynicm2018-04-18
| | | | | | | | | | | | | intended as the target client where the message should be displayed but at some point (perhaps when -p was added), it was used for format expansion too. This means it can get a bit weird where you have client formats expanding for a client with a different current session than the target session. However, it is nice that display-message can be used to show information about a specific client. So change so that the -c client will be used if the session matches the target session (-t or default), otherwise the best client will be chosen.
* Fix negative window index range check (> not <). Reported by Juan Pablonicm2018-03-17
| | | | in GitHub issue 1283.
* Another redundant check, GitHub issue 1219.nicm2018-01-15
|
* Some unused code, GitHub issue 1219.nicm2018-01-15
|
* Pass flags into cmd_find_from_* to fix prefer-unattached, reported bynicm2017-08-30
| | | | Thomas Sattler.
* Do not forbid targets to specify non-visible panes - the checks fornicm2017-08-28
| | | | visibility are better where the target is used. GitHub issue 1049.
* When working out the current client (for example for switch-client withnicm2017-07-07
| | | | | no target), prefer clients attached to the current session if there is one. GitHub issue 995 from Jan Larres.
* Tweak some logging.nicm2017-06-16
|
* Add missing error message when no target, GitHub issue 971.nicm2017-06-14
|
* Do not need getopt.h.nicm2017-04-22
|
* Get rid of the extra layer of flags and cmd_prepare() and just store thenicm2017-04-22
| | | | | | 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.
* Log error properly when no current state, and some other minor tweaks.nicm2017-04-21
|
* Make sure cmd_find_from_* clear the state if they fail.nicm2017-04-21
|
* Make the cmd_find_* functions more obvious when looking for a client,nicm2017-04-21
| | | | | rather than having it inside other functions. Should be no change to the way targets are resolved just yet.
* Add cmd_find_from_winlink_pane and use it in a couple of places, andnicm2017-04-21
| | | | make functions that can't fail void.
* More unnecessary arguments now winlink points back to session.nicm2017-04-21
|
* Store state shared between multiple commands in the queue in a sharednicm2017-04-21
| | | | structure.
* Try again to resolve problems with mistaking sessions for windows: nownicm2017-04-05
| | | | | | | | | | do not look up windows as sessions (and panes as windows) when they are qualified with a ':' or a '.'. So 'foo' as a window target will look for windows and sessions called 'foo', but ':foo' will only look for windows, and 'foo:' only for sessions. This means the common case of using an unadorned session as a window target (send -tfoo) should continue to work, but an explicit window will not get confused with a session (send -t:foo).
* Give each client a name. This defaults to the tty name as before butnicm2017-04-05
| | | | | | | falls back to an alternative if the tty name is not available. This is clearer than overloading the client ttyname member and allows us to remove the path stored in the tty struct, it should always be the same as the client.
* Revert previous, breaks normal short targets, reported by Theo Buehler.nicm2017-03-13
|
* Only look for window and pane parts of target as a sesson and window ifnicm2017-03-11
| | | | they look like an ID.
* The target validity check used window_pane_visible but that may be falsenicm2016-11-16
| | | | | | | if the pane is zoomed, so instead add a new function to just check if the pane is actually on screen (most commands still want to accept panes invisible by zoom). Also reject panes outside the window for various special targets. Problem reported by Sean Haugh.
* Tweak a couple of log statements.nicm2016-10-18
|
* Use the notify name string instead of going via an enum and changenicm2016-10-16
| | | | existing hooks to use notifys instead.
* Mass rename struct cmd_q to struct cmdq_item and related.nicm2016-10-16
|
* Rewrite command queue handling. Each client still has a command queue,nicm2016-10-16
| | | | | | | | | | | | | | | 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.
* Fire hooks on the simple notifys (window-renamed and session-renamed),nicm2016-10-15
| | | | the complicated ones get no hooks for now (more to come).
* Some improvements and bug fixes for hooks:nicm2016-10-13
| | | | | | | | | | | | | | | | | | | | | - 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.
* Add static in cmd-* and fix a few other nits.nicm2016-10-10
|
* Accept clients as sessions in cmd_find_get_session.nicm2016-03-03
|
* Split out getting the current state from the target search so it can benicm2016-01-19
| | | | replaced if we already know the current.
* I no longer use my SourceForge address so replace it.nicm2016-01-19
|