summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/window.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add split-window -Z to start the pane zoomed, GitHub issue 2591.nicm2021-03-111-4/+4
|
* There are many format variables now so allocating all the default onesnicm2021-02-221-12/+1
| | | | | | | | each time a tree is created is too expensive. Instead, convert them all into callbacks and put them in a static table so they only allocate on demand. The tree remains for the moment for extra (non-default) variables added by for example copy mode or popups. Also reduce expensive calls to localtime_r/strftime. GitHub issue 2253.
* Change so that window_flags escapes # automatically which means configsnicm2021-01-201-3/+6
| | | | | will not have to change. A new format window_raw_flags contains the old unescaped version.
* Make synchronize-panes a pane option and add -U flag to set-option tonicm2020-12-151-12/+19
| | | | unset an option on all panes. GitHub issue 2491 from Rostislav Nesin.
* Add -b flags to insert a window before (like the existing -a for after)nicm2020-06-131-5/+9
| | | | to break-pane, move-window, new-window. GitHub issue 2261.
* Change how panes are resized so that the code is clearer and if the panenicm2020-06-051-6/+22
| | | | | | is resized multiple times during one event loop, it is forced to resize at the end. Also don't zoom/unzoom in switch-client if the pane hasn't changed. GitHub issue 2260.
* Instead of sending all data to control mode clients as fast as possible,nicm2020-06-011-21/+5
| | | | | | add a limit of how much data will be sent to the client and try to use it for panes with some degree of fairness. GitHub issue 2217, with George Nachman.
* Support code for control mode flow control: allow clients to havenicm2020-05-211-13/+55
| | | | | | separate offsets (used and acknowleged) into the pane buffers; turn off reading from panes when no clients can accept the data; and add a -A flag to refresh-client to let clients turn receiving a pane on and off.
* Move lazy resize from the pane to the window, there is no point innicm2020-05-161-3/+4
| | | | | | resizing the window unless it is the current window, and if we do and don't resize the pane until later there are problems if the size changes from A to B then back to A.
* Separate key flags and modifiers, log key flags, make the "xterm" flagnicm2020-05-161-3/+5
| | | | more explicit and fix M- keys with a leading escape.
* Do not hoke into struct window_pane from the tty code and instead setnicm2020-05-161-21/+1
| | | | | | | everything up in tty_ctx. Provide a way to initialize the tty_ctx from a callback and use it to let popups draw directly through input_parse in the same way as panes do, rather than forcing a full redraw on every change.
* Drop having a separate type for style options and make them all strings,nicm2020-05-161-1/+6
| | | | | | | | | | | | | | | | | which allows formats to be expanded. Any styles without a '#{' are still validated when they are set but any with a '#{' are not. Formats are not expanded usefully in many cases yet, that will be changed later. To make this work, a few other changes: - set-option -a with a style option automatically appends a ",". - OSC 10 and 11 don't set the window-style option anymore, instead the fg and bg are stored in the pane struct and act as the defaults that can be overridden by window-style. - status-fg and -bg now override status-style instead of trying to keep them in sync.
* Use a grid cell not a style for the pane style.nicm2020-05-161-10/+10
|
* Make client -c and -t handling common in cmd-queue.c and try to benicm2020-04-131-2/+2
| | | | | clearer about whether the client is the target client (must have a session) or not.
* Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make itsnicm2020-04-131-2/+2
| | | | use more clearly defined and preparation for some future work).
* Now that copy mode copies the pane content rather than keeping anicm2020-04-101-3/+5
| | | | | | | | | | reference to it, it isn't necessary that the pane in copy mode is the same as the one copying from. Add a -s flag to copy-mode to specify a different pane for the source content. This means it is possible to view two places in a pane's history at the same time in different panes, or copy from a pane's history into an editor or shell in the same pane. From Anindya Mukherjee.
* Pass correct flags to fnmatch.nicm2020-04-091-2/+2
|
* Change copy mode to make copy of the pane history so it does not need tonicm2020-04-061-28/+1
| | | | | | freeze updates (which does not play nicely with some applications, a longstanding problem) and will allow some other changes later. From Anindya Mukherjee.
* Move alternate screen into the screen rather than the pane.nicm2020-03-311-77/+4
|
* Detach reply escape sequences from the pane so they work in popups.nicm2020-03-311-5/+4
|
* Change input path so it doesn't require a pane.nicm2020-03-191-6/+6
|
* FIx type for %u, from Thomas Adam.nicm2020-03-161-3/+3
|
* Fix top/bottom pane calculation with pane border status enabled,nicm2020-02-141-8/+15
| | | | reported by Stanislav Spassov.
* Treat plausible but invalid keys (like C-BSpace) as literal like anynicm2020-01-131-7/+9
| | | | | other unrecognised string passed to send-keys. Reported by Anthony Sottile in GitHub issue 2049.
* Rewrite the code for reading and writing files. Now, if the client isnicm2019-12-121-15/+14
| | | | | | | | | not attached, the server process asks it to open the file, similar to how works for stdin, stdout, stderr. This makes special files like /dev/fd/X work (used by some shells). stdin, stdout and stderr and control mode are now just special cases of the same mechanism. This will also make it easier to use for other commands that read files such as source-file.
* Make a best effort to set xpixel and ypixel for each pane and addnicm2019-11-281-4/+40
| | | | formats for them.
* Start with empty rather than NULL window name to avoid NULL printf ifnicm2019-10-281-2/+2
| | | | window_name is evaluated early. Reported by Mikolaj Kucharski.
* Make client exit if pane where input is going is closed.nicm2019-09-101-1/+5
|
* The resize event was never deciding to actually resize the pane if therenicm2019-08-281-2/+2
| | | | | | | was output in the pane faster than the timer would fire, so change how it works to only defer the timer again if the pane was actually resized within the last timer period. Reported by James Tai in GitHub issue 1880.
* Add -Z flag to rotate-window, select-pane, swap-pane, switch-client tonicm2019-08-141-1/+23
| | | | preserve zoomed state. GitHub issue 1839.
* Do not double free window if pane fails to start.nicm2019-06-301-2/+2
|
* Fix a typo in window_pane_find_down (w not wp) and a missing PANE_STATUS_TOP.nicm2019-06-261-2/+2
|
* Log window and pane resizes.nicm2019-06-261-1/+3
|
* Add #define for the pane status line option position numbers.nicm2019-06-261-13/+37
|
* Trim trailing spaces when matching.nicm2019-06-241-1/+9
|
* allow-rename and alternate-screen can be pane options.nicm2019-06-201-3/+3
|
* Add a per-pane option set. Pane options inherit from window options (sonicm2019-06-201-25/+32
| | | | | | | | | | | | there should be no change to existing behaviour) and are set and shown with set-option -p and show-options -p. Change remain-on-exit and window-style/window-active-style to be pane options (some others will be changed later). This makes select-pane -P and -g unnecessary so no longer document them (they still work) and no longer document set-window-option and show-window-options in favour of set-option -w and show-options -w.
* Add a cmdq_continue function rather than twiddling the flag directly.nicm2019-06-181-2/+2
|
* Add regular expression support for the format search, match andnicm2019-06-131-9/+27
| | | | substitute modifiers.
* Exiting alternate screen mode should restore cursor position andnicm2019-06-091-13/+21
| | | | | attributes even if already outside alternate screen mode. GitHub issue 1789.
* Remove a leftover abort and some fixes from cppcheck.nicm2019-05-301-2/+2
|
* Do not use evbuffer_add_buffer because it is destructive and doesn'tnicm2019-05-071-4/+6
| | | | work in newer libevent.
* Allow panes to be empty (no command), output can be piped to them withnicm2019-05-031-1/+48
| | | | split-window or display-message -I.
* Destroy panes before options to avoid crash when forced into a mode by anicm2019-04-261-3/+3
| | | | hook.
* Break new window and pane creation common code from various commands andnicm2019-04-171-187/+30
| | | | window.c into a separate file spawn.c.
* Free temporary screens when writing format.nicm2019-03-181-1/+3
|
* Extend the #[] style syntax and use that together with previous formatnicm2019-03-181-2/+1
| | | | | | | | | | | | | | | | | | | | changes to allow the status line to be entirely configured with a single option. Now that it is possible to configure their content, enable the existing code that lets the status line be multiple lines in height. The status option can now take a value of 2, 3, 4 or 5 (as well as the previous on or off) to configure more than one line. The new status-format array option configures the format of each line, the default just references the existing status-* options, although some of the more obscure status options may be eliminated in time. Additions to the #[] syntax are: "align" to specify alignment (left, centre, right), "list" for the window list and "range" to configure ranges of text for the mouse bindings. The "align" keyword can also be used to specify alignment of entries in tree mode and the pane status lines.
* Mode init needs to be fired with the mode on the list or it will not benicm2019-03-181-4/+5
| | | | resized correctly.
* Add format variables for the default formats for the various modesnicm2019-03-181-1/+12
| | | | | (tree_mode_format and so on) and add a -a flag to display-message to list variables with values.
* Add a wrapper (struct style) around styles rather than using thenicm2019-03-141-11/+11
| | | | grid_cell directly. There will be some non-cell members soon.