summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/window.c
AgeCommit message (Collapse)Author
2017-05-12Store copy mode search string in pane so search-again command works evenNicholas Marriott
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 andNicholas Marriott
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 moreNicholas Marriott
obviously.
2017-04-28Remove a reference from the right window when removing from a winlink'sNicholas Marriott
list.
2017-04-20Use fdforkpty() instead of our own unwrapped versions.Nicholas Marriott
2017-04-20Now that struct winlink has a session pointer, can remove some arguments.Nicholas Marriott
2017-04-20There is no real need for window_printable_flags to allocate, make itNicholas Marriott
return a buffer from the stack.
2017-03-21Fix pane movement by direction (up, down, left, right) whenNicholas Marriott
pane-border-status is set, from KOIE Hidetaka.
2017-03-13Log where panes are created.Nicholas Marriott
2017-02-27If splitw -b is used, insert the new pane before the current one in theNicholas Marriott
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.Nicholas Marriott
2017-02-08Remove event watermarks, don't work well enough to be worth it.Nicholas Marriott
2017-01-24Shorten a long line, and don't leak buffer in paste_add if size is zero.Nicholas Marriott
2017-01-23Open /dev/ptm before pledge() and save it to be used for PTMGET laterNicholas Marriott
(this means inlining forkpty()). ok deraadt
2017-01-12Put all palette functions together in the file.Nicholas Marriott
2017-01-12Erm the aixterm colours should start at 8, not 7.Nicholas Marriott
2017-01-12Fix setting the palette of aixterm colours (90-97).Nicholas Marriott
2017-01-07Add support for the OSC 4 and OSC 104 palette setting escape sequences,Nicholas Marriott
from S Gilles.
2016-11-16Initialize modeprefix to 1 properly in window_pane_create, from Artem Fokin.Nicholas Marriott
2016-11-16The target validity check used window_pane_visible but that may be falseNicholas Marriott
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,Nicholas Marriott
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.Nicholas Marriott
2016-10-16Use the notify name string instead of going via an enum and changeNicholas Marriott
existing hooks to use notifys instead.
2016-10-15Give window_create and window_create1 better names.Nicholas Marriott
2016-10-13Add support for BCE (background colour erase). This makes various escapeNicholas Marriott
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.Nicholas Marriott
2016-10-11Fundamental change to how copy mode key bindings work:Nicholas Marriott
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 withNicholas Marriott
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 buffersNicholas Marriott
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.Nicholas Marriott
2016-07-15Log environment to new panes.Nicholas Marriott
2016-06-16Allow a command to be specified to display-panes, similar toNicholas Marriott
command-prompt, rather than always just selecting the pane.
2016-06-15Copy mode needs to keep the original grid intact so it can copy from itNicholas Marriott
if needed, so it disables reading from the pane. This can be problem with some programs. So make tmux automatically exit all modes after 180 seconds of inactivity and if there is pending output.
2016-06-06Insert new panes after the pane being split in the list rather thanNicholas Marriott
always after the active pane. This is more sensible when doing it with commands rather than keys.
2016-05-30Cache the window styles and do not look up the window-style optionsNicholas Marriott
unless they have changed.
2016-04-29Add option to include status text in the pane borders. IfNicholas Marriott
pane-border-status is set to "top" or "bottom" (rather than "off"), every pane has a permanent top or bottom border containing the text from pane-border-format. Based on a diff sent long ago by Jonathan Slenders, mostly rewritten and simplified by me.
2016-04-29The backoff timer is causing no end of trouble with disconnected clientsNicholas Marriott
stopping data in attached ones. So get rid of it and see how we get on with just a high watermark on each pane.
2016-03-01Redraw status on mode entry and exit.Nicholas Marriott
2016-01-19I no longer use my SourceForge address so replace it.Nicholas Marriott
2015-12-31Use saved pipe buffer offset when writing to pipe, from Nicolas Viennot.Nicholas Marriott
2015-12-19Make input off flag (selectp -d) apply to synchronize-panes too.Nicholas Marriott
2015-12-16Add infrastructure to work out the best target given a pane or windowNicholas Marriott
alone and use it to add pane_died and pane_exited hooks.
2015-12-15Make the marked pane a cmd_find_state.Nicholas Marriott
2015-12-02Mark new active pane changed after pane lost in window, and afterNicholas Marriott
break-pane. Reported by tim@.
2015-11-24Make environ_set va_args and use it to tidy up some calls. Also add aNicholas Marriott
missing word in manpage (from jmc).
2015-11-18Use __unused rather than rolling our own.Nicholas Marriott
2015-11-12Support UTF-8 key bindings by expanding the key type from int toNicholas Marriott
uint64_t and converting UTF-8 to Unicode on input and the reverse on output. (This allows key bindings, there are still omissions - the largest being that the various prompts do not accept UTF-8.)
2015-10-31Because pledge(2) does not allow us to pass directory file descriptorsNicholas Marriott
around, we can't use file descriptors for the working directory because we will be unable to pass it to a privileged process to tell it where to read or write files or spawn children. So move tmux back to using strings for the current working directory. We try to check it exists with access() when it is set but ultimately fall back to ~ if it fails at time of use (or / if that fails too).
2015-10-27Move struct options into options.c.Nicholas Marriott
2015-09-14When the active pane changes, redraw panes if the style hasNicholas Marriott
changed. From Cam Hutchison.