summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-04-25Block the initial client if there is one until the configuration filenicm
has finished loading.
2017-04-25if-shell doesn't need to queue its error message into a callback, and innicm
fact it can't do so because the item it was working with will have been freed. Reported by Daniel Hahler.
2017-04-23Only use ED for clear screen if at the bottom, same as earlier fix tonicm
clear end of screen.
2017-04-22Memory leak from David CARLIER.nicm
2017-04-22Do not need getopt.h.nicm
2017-04-22Can't collect UTF-8 characters of more than one byte at the moment.nicm
2017-04-22new -A should use the session name.nicm
2017-04-22Get rid of the extra layer of flags and cmd_prepare() and just store thenicm
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.
2017-04-22Mouse bindings and hooks set up an initial current state when running anicm
command. This is used for the session, window and pane for all commands in the command sequence if there is no -t or -s. However, using it for all commands in the command sequence means that if the active pane or current session is changed, subsequent commands still use the previous state. So make commands which explicitly change the current state (such as neww and selectp) update it themselves for later commands. Commands which may invalidate the state (like killp) are already OK because an invalid state will be ignored. Also fill in the current state for all key bindings rather than just the mouse, so that any omissions are easier to spot.
2017-04-22We need to collect UTF-8 characters so that width != 1 characters arenicm
correctly flushed.
2017-04-22Fix if-shell without a client (so in the config file). Reported by Theonicm
Buehler.
2017-04-22Typo in example.nicm
2017-04-22Memory leaks, from David CARLIER.nicm
2017-04-21Log error properly when no current state, and some other minor tweaks.nicm
2017-04-21Make sure cmd_find_from_* clear the state if they fail.nicm
2017-04-21Rename a variable.nicm
2017-04-21Clear shared state if not filling it in.nicm
2017-04-21Make the cmd_find_* functions more obvious when looking for a client,nicm
rather than having it inside other functions. Should be no change to the way targets are resolved just yet.
2017-04-21Key needs to be initialized to zero now it has flags in it.nicm
2017-04-21Style nits and an unused struct.nicm
2017-04-21Add cmd_find_from_winlink_pane and use it in a couple of places, andnicm
make functions that can't fail void.
2017-04-21It is annoying that the copy mode key table (or any other key table)nicm
will suppress root key table bindings. So change to always check the root table if no binding is found in the current table (whether it be the prefix table from pressing the prefix or the copy mode table from a pane). A root key binding can be blocked by binding the key to a command that does nothing (like send-keys with no arguments). Problem reported by Thomas Sattler.
2017-04-21More unnecessary arguments now winlink points back to session.nicm
2017-04-21History needs to be loaded after config parsing is done - now thatnicm
commands are queued, that's in cfg_done not after start_cfg finishes.
2017-04-21Store state shared between multiple commands in the queue in a sharednicm
structure.
2017-04-21Do not run the config file in the context of the first client, insteadnicm
use no client like we did before. This means commands like new-session won't try to attach if they are in the config file.
2017-04-20Use fdforkpty() instead of our own unwrapped versions.nicm
2017-04-20Only set up a current target for mouse key bindings. Fixes:nicm
bind q select-pane -U \; resize-pane -Z (There is still some possible weirdness with the way we do current targets, it should probably be done in a different way at some point.)
2017-04-20Now that struct winlink has a session pointer, can remove some arguments.nicm
2017-04-20There is no real need for window_printable_flags to allocate, make itnicm
return a buffer from the stack.
2017-04-20If a #() command doesn't exit, use its most recent line of output (itnicm
must be a full line). Don't let it redraw the status line more than once a second. Requested by someone about 10 years ago...
2017-04-19load_cfg returns < 0 on error, not != 0. Problem reported by Kaushal Modi.nicm
2017-04-19Add a suspend helper function, and do not allow detaching or suspendingnicm
while already doing so.
2017-04-19Style nits and a missing cast.nicm
2017-04-19When the data we have buffered to write to a terminal grows beyond anicm
reasonable amount (currently width * height * 8 bytes), discard all output to the terminal and start trying to redraw periodically instead. Continue with this until the amount of data we are trying to write falls to a low level again. This helps to prevent tmux sitting on a huge buffer of data when there are processes with fast output running inside tmux but the outside terminal is slow. A new client_discarded format holds the amount of data that has been discarded due to this mechanism. The three variables (when to start this, when to stop, and how often to redraw) are basically "works for me" at the moment, this is going in to see how it goes and if it causes problems for anyone else.
2017-04-18Revert use of DECSLRM on iTerm2, it doesn't help as much as we throught,nicm
and there are some question marks about it's support.
2017-04-18On terminals without DECSLRM, when a pane that is less than the fullnicm
with of the terminal scrolls, tmux needs to redraw the entire pane. This results in a large amount of output data which can cause slow terminals to struggle, particularly when many lines are scrolled together quickly. This can be reduced by only redrawing when tmux doesn't hold any buffered data for the terminal. If a redraw is required and data is buffered, the redraw is deferred until all that data is consumed (it is checked after every event loop, a timer is used to ensure this happens at some point). While a redraw is pending, no additional data will be written to the terminal. The redraw still happens, now it is just pushed back if it is possible it would just add more data on top of a terminal that is already behind. This both gives the terminal a chance to catch up, and allows tmux to process more scrolling (that would require additional redraws) in the meantime. Helps with a problem reported by Greg Hurrell.
2017-04-18Detect iTerm2 and use DECSLRM for it as well.nicm
2017-04-18Add a format for number of bytes writtent to client, useful for debugging.nicm
2017-04-18Do not check for BCE for a background colour that isn't needed, usenicm
colour 8 instead.
2017-04-18Include client name in key logging.nicm
2017-04-17Don't bother moving the cursor for empty lines.nicm
2017-04-17Remove a couple of redraw flags that no longer have any effect.nicm
2017-04-16Memory leak, from David CARLIER.nicm
2017-04-16Use EL1 to clear lines when redrawing the leftmost pane, rather thannicm
spaces.
2017-04-05Add Home and End for copy mode.nicm
2017-04-05Try again to resolve problems with mistaking sessions for windows: nownicm
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).
2017-04-05Give each client a name. This defaults to the tty name as before butnicm
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.
2017-04-05cfg_file can be static.nicm
2017-03-24Write raw strings in one go rather than character at a time.nicm