summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/window.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Do not forbid targets to specify non-visible panes - the checks fornicm2017-08-281-12/+9
| | | | visibility are better where the target is used. GitHub issue 1049.
* Because ignore SIGCHLD early, letting signal_del restore it doesn't worknicm2017-07-141-2/+2
| | | | | correctly, so set it explicitly back to default (and the others for good measure).
* Block signals between forking and clearing signal handlers (or callingnicm2017-07-121-6/+14
| | | | | | 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.
* Move signal code into proc.c.nicm2017-07-121-2/+2
|
* Change previous to not wait for both process exit and pty close -nicm2017-07-031-6/+10
| | | | | | 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.
* Do not close panes until process has exited and any outstanding datanicm2017-07-031-2/+19
| | | | has been written to the pipe-pane event if there is one. GitHub issue 991.
* Apply the xterm key flag when needed for send-keys, fixes problemnicm2017-06-281-2/+2
| | | | reported by Franky Spamschleuder.
* Be more strict about escape sequences that rename windows or set titles:nicm2017-06-041-2/+3
| | | | | ignore any that not valid UTF-8 outright, and for good measure pass the result through our UTF-8-aware vis(3).
* Because we defer actually resizing applications (calling TIOCSWINSZ)nicm2017-05-311-3/+3
| | | | | | | | | | | | | | | | | 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.
* Rewrite of choose mode, both to simplify and tidy the code and to addnicm2017-05-301-29/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add ||, && format operators and C: to search pane content.nicm2017-05-291-2/+26
|
* Store copy mode search string in pane so search-again command works evennicm2017-05-121-1/+2
| | | | | if you exit and reenter copy mode (it doesn't remember the position, just the search string), suggested by espie@.
* Some new notifications, mainly for active pane and current window andnicm2017-05-041-3/+12
| | | | | | | | | | | session: pane-mode-changed window-pane-changed client-session-changed session-window-changed From Joshua Brot.
* Log what is happening with window and session reference counts much morenicm2017-04-281-9/+15
| | | | obviously.
* Remove a reference from the right window when removing from a winlink'snicm2017-04-281-2/+2
| | | | list.
* Use fdforkpty() instead of our own unwrapped versions.nicm2017-04-201-2/+2
|
* Now that struct winlink has a session pointer, can remove some arguments.nicm2017-04-201-5/+5
|
* There is no real need for window_printable_flags to allocate, make itnicm2017-04-201-5/+5
| | | | return a buffer from the stack.
* Fix pane movement by direction (up, down, left, right) whennicm2017-03-211-8/+10
| | | | pane-border-status is set, from KOIE Hidetaka.
* Log where panes are created.nicm2017-03-131-4/+8
|
* If splitw -b is used, insert the new pane before the current one in thenicm2017-02-271-9/+12
| | | | | | pane list. This means the numbering is in order (for example for display-panes) and fixes a problem with redrawing the active pane borders.
* Minor bits: fix an array size, add comment, make grid_cell_entry static.nicm2017-02-221-1/+2
|
* Remove event watermarks, don't work well enough to be worth it.nicm2017-02-081-26/+3
|
* Shorten a long line, and don't leak buffer in paste_add if size is zero.nicm2017-01-241-2/+3
|
* Open /dev/ptm before pledge() and save it to be used for PTMGET laternicm2017-01-231-2/+2
| | | | | | (this means inlining forkpty()). ok deraadt
* Put all palette functions together in the file.nicm2017-01-121-21/+21
|
* Erm the aixterm colours should start at 8, not 7.nicm2017-01-121-2/+2
|
* Fix setting the palette of aixterm colours (90-97).nicm2017-01-121-5/+25
|
* Add support for the OSC 4 and OSC 104 palette setting escape sequences,nicm2017-01-071-10/+51
| | | | from S Gilles.
* Initialize modeprefix to 1 properly in window_pane_create, from Artem Fokin.nicm2016-11-161-1/+2
|
* The target validity check used window_pane_visible but that may be falsenicm2016-11-161-6/+12
| | | | | | | 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.
* Alerts are too slow, so rather than walking all sessions and windows,nicm2016-10-191-17/+24
| | | | | | 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).
* Store the right size in the pipe offset for pipe-pane.nicm2016-10-181-2/+2
|
* Use the notify name string instead of going via an enum and changenicm2016-10-161-4/+4
| | | | existing hooks to use notifys instead.
* Give window_create and window_create1 better names.nicm2016-10-151-6/+6
|
* Add support for BCE (background colour erase). This makes various escapenicm2016-10-131-2/+2
| | | | | | | | | | | | 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.
* Add static in window-*.c and move some internal functions out of tmux.h.nicm2016-10-111-8/+12
|
* Fundamental change to how copy mode key bindings work:nicm2016-10-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Rate limit TIOCSWINSZ on a timer to avoid programs getting hammered withnicm2016-09-281-1/+4
| | | | | SIGWINCH when the size changes rapidly. To help a problem reported by Rui Pinheiro.
* Swap watermarks from high (4096) to low (128) when we get full buffersnicm2016-09-161-16/+38
| | | | | | | | | 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.
* Tweak output of environment logging.nicm2016-07-151-2/+2
|
* Log environment to new panes.nicm2016-07-151-1/+2
|
* Allow a command to be specified to display-panes, similar tonicm2016-06-161-1/+2
| | | | command-prompt, rather than always just selecting the pane.
* Copy mode needs to keep the original grid intact so it can copy from itnicm2016-06-151-1/+28
| | | | | | 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.
* Insert new panes after the pane being split in the list rather thannicm2016-06-061-5/+9
| | | | | always after the active pane. This is more sensible when doing it with commands rather than keys.
* Cache the window styles and do not look up the window-style optionsnicm2016-05-301-2/+2
| | | | unless they have changed.
* Add option to include status text in the pane borders. Ifnicm2016-04-291-1/+3
| | | | | | | | | 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.
* The backoff timer is causing no end of trouble with disconnected clientsnicm2016-04-291-37/+4
| | | | | stopping data in attached ones. So get rid of it and see how we get on with just a high watermark on each pane.
* Redraw status on mode entry and exit.nicm2016-03-011-1/+5
|
* I no longer use my SourceForge address so replace it.nicm2016-01-191-2/+2
|