summaryrefslogtreecommitdiffstats
path: root/window.c
AgeCommit message (Collapse)Author
2018-08-05calloc the mode data instead of malloc and initialize everything.nicm
2018-08-02Log command arguments.nicm
2018-05-24Make server_client_get_cwd used (almost) everywhere we need to work outnicm
the cwd, and do not fall back to "." as it is pretty useless. GitHub issue 1331.
2018-05-24Improve logging of the environment etc for new panes.nicm
2018-03-16Insert full size panes at the right position, from KOIE Hidetaka innicm
GitHub issue 1284.
2017-11-09If we successfully change the directory, set PWD too to give the shell anicm
hint in case of symlinks.
2017-10-12Show exit status and time in the remain-on-exit pane text, mostly fromnicm
Timo Boettcher in GitHub issue 1103.
2017-08-28Do not forbid targets to specify non-visible panes - the checks fornicm
visibility are better where the target is used. GitHub issue 1049.
2017-07-14Because ignore SIGCHLD early, letting signal_del restore it doesn't worknicm
correctly, so set it explicitly back to default (and the others for good measure).
2017-07-12Block signals between forking and clearing signal handlers (or callingnicm
event_reinit) - if the child gets a signal and fires the libevent signal handler during this period it could write a signal into the parent's signal pipe. GitHub issue 1001 from Aaron van Geffen.
2017-07-12Move signal code into proc.c.nicm
2017-07-03Change previous to not wait for both process exit and pty close -nicm
instead if there is a pipe-pane active, do not exit until all data is read (including any libevent hasn't seen yet). Fixes problem reported by Theo Buehler and still seems to solve the original issue.
2017-07-03Do not close panes until process has exited and any outstanding datanicm
has been written to the pipe-pane event if there is one. GitHub issue 991.
2017-06-28Apply the xterm key flag when needed for send-keys, fixes problemnicm
reported by Franky Spamschleuder.
2017-06-04Be more strict about escape sequences that rename windows or set titles:nicm
ignore any that not valid UTF-8 outright, and for good measure pass the result through our UTF-8-aware vis(3).
2017-05-31Because we defer actually resizing applications (calling TIOCSWINSZ)nicm
until the end of the server loop, tmux may have gone through several internal resizes in between. This can be a problem if the final size is the same as the initial size (what the application things it currently is), because the application may choose not to redraw, assuming the screen state is unchanged, when in fact tmux has thrown away parts of the screen, assuming the application will redraw them. To avoid this, do an extra resize if the new size is the same size as the initial size. This should force the application to redraw when tmux needs it to, while retaining the benefits of deferring (so we now resize at most two times instead of at most one - and only two very rarely). Fixes a problem with break-pane and zoomed panes reported by Michal Mazurek.
2017-05-30Rewrite of choose mode, both to simplify and tidy the code and to addnicm
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.
2017-05-29Add ||, && format operators and C: to search pane content.nicm
2017-05-12Store copy mode search string in pane so search-again command works evennicm
if you exit and reenter copy mode (it doesn't remember the position, just the search string), suggested by espie@.
2017-05-04Some new notifications, mainly for active pane and current window andnicm
session: pane-mode-changed window-pane-changed client-session-changed session-window-changed From Joshua Brot.
2017-04-28Log what is happening with window and session reference counts much morenicm
obviously.
2017-04-28Remove a reference from the right window when removing from a winlink'snicm
list.
2017-04-20Use fdforkpty() instead of our own unwrapped versions.nicm
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-03-21Fix pane movement by direction (up, down, left, right) whennicm
pane-border-status is set, from KOIE Hidetaka.
2017-03-13Log where panes are created.nicm
2017-02-27If splitw -b is used, insert the new pane before the current one in thenicm
pane list. This means the numbering is in order (for example for display-panes) and fixes a problem with redrawing the active pane borders.
2017-02-22Minor bits: fix an array size, add comment, make grid_cell_entry static.nicm
2017-02-08Remove event watermarks, don't work well enough to be worth it.nicm
2017-01-24Shorten a long line, and don't leak buffer in paste_add if size is zero.nicm
2017-01-23Open /dev/ptm before pledge() and save it to be used for PTMGET laternicm
(this means inlining forkpty()). ok deraadt
2017-01-12Put all palette functions together in the file.nicm
2017-01-12Erm the aixterm colours should start at 8, not 7.nicm
2017-01-12Fix setting the palette of aixterm colours (90-97).nicm
2017-01-07Add support for the OSC 4 and OSC 104 palette setting escape sequences,nicm
from S Gilles.
2016-11-16Initialize modeprefix to 1 properly in window_pane_create, from Artem Fokin.nicm
2016-11-16The target validity check used window_pane_visible but that may be falsenicm
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.
2016-10-19Alerts are too slow, so rather than walking all sessions and windows,nicm
add a link of winlinks to each window and a pointer to the session to each winlink. Also rewrite the alerts processing to return to the old behaviour (alert in any window sets the flag on any winlink).
2016-10-18Store the right size in the pipe offset for pipe-pane.nicm
2016-10-16Use the notify name string instead of going via an enum and changenicm
existing hooks to use notifys instead.
2016-10-15Give window_create and window_create1 better names.nicm
2016-10-13Add support for BCE (background colour erase). This makes various escapenicm
sequences (notable EL and ED but also IL, DL, ICH, DCH) create blank cells using the current background colour rather than the default colour. On modern systems BCE doesn't really have many benefits, but most other terminals now support it, some (lazy) applications rely on it, and it is not hard to include now that we have pane background colours anyway. Mostly written by Sean Haugh.
2016-10-11Add static in window-*.c and move some internal functions out of tmux.h.nicm
2016-10-11Fundamental change to how copy mode key bindings work:nicm
The vi-copy and emacs-copy mode key tables are gone, and instead copy mode commands are bound in one of two normal key tables ("copy-mode" or "copy-mode-vi"). Keys are bound to "send-keys -X copy-mode-command". So: bind -temacs-copy C-Up scroll-up bind -temacs-copy -R5 WheelUpPane scroll-up Becomes: bind -Tcopy-mode C-Up send -X scroll-up bind -Tcopy-mode WheelUpPane send -N5 -X scroll-up This allows the full command parser and command set to be used - for example, we can use the normal command prompt for searching, jumping, and so on instead of a custom one: bind -Tcopy-mode C-r command-prompt -p'search up' "send -X search-backward '%%'" command-prompt also gets a -1 option to only require on key press, which is needed for jumping. The plan is to get rid of mode keys entirely, so more to come eventually.
2016-09-28Rate limit TIOCSWINSZ on a timer to avoid programs getting hammered withnicm
SIGWINCH when the size changes rapidly. To help a problem reported by Rui Pinheiro.
2016-09-16Swap watermarks from high (4096) to low (128) when we get full buffersnicm
into the read callback several times in succession; swap back when we see empty buffers several times. This hopefully limits how much programs that print a lot for a long period can monopolize tmux (like large, fast compiling), without penalizing programs that print a lot briefly (like most curses applications). Helps a lot for me, the actual numbers may need tweaking later.
2016-07-15Tweak output of environment logging.nicm
2016-07-15Log environment to new panes.nicm
2016-06-16Allow a command to be specified to display-panes, similar tonicm
command-prompt, rather than always just selecting the pane.