OpenBSD CVS

CVS log for src/usr.bin/tmux/screen-redraw.c


[BACK] Up to [local] / src / usr.bin / tmux

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.96 / (download) - annotate - [select for diffs], Thu Jun 30 09:55:53 2022 UTC (22 months, 2 weeks ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, HEAD
Changes since 1.95: +2 -2 lines
Diff to previous 1.95 (colored)

Add support for OSC 8 hyperlinks (a VTE extension now supported by other
terminals such as iTerm2). Originally written by me then extended and
completed by first Will Noble and later Jeff Chiang. GitHub issues 911,
2621, 2890, 3240.

Revision 1.95 / (download) - annotate - [select for diffs], Wed Mar 16 17:00:17 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.94: +10 -5 lines
Diff to previous 1.94 (colored)

Add an option to set the character used for unused areas of the
terminal, GitHub issue 3110.

Revision 1.94 / (download) - annotate - [select for diffs], Fri Feb 4 11:57:22 2022 UTC (2 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.93: +4 -2 lines
Diff to previous 1.93 (colored)

Use ACS for pane border indicators so they work with different line
types, from Thomas Adam.

Revision 1.93 / (download) - annotate - [select for diffs], Tue Feb 1 14:46:41 2022 UTC (2 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.92: +63 -21 lines
Diff to previous 1.92 (colored)

Add option to show arrows for active pane indicator, GitHub issue 3022
from Marcel Partap.

Revision 1.92 / (download) - annotate - [select for diffs], Mon Dec 13 09:42:20 2021 UTC (2 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.91: +2 -2 lines
Diff to previous 1.91 (colored)

Make pane-border-format a pane option, GitHub issue 2999.

Revision 1.91 / (download) - annotate - [select for diffs], Tue Oct 26 12:22:23 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.90: +2 -2 lines
Diff to previous 1.90 (colored)

Do not allow inline styles to replace mode-style for the selected item,
from Alexis Hildebrandt in GitHub issue 2946.

Revision 1.90 / (download) - annotate - [select for diffs], Thu Oct 14 13:19:01 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.89: +13 -60 lines
Diff to previous 1.89 (colored)

Add popup-border-lines option to set popup line style, from Alexis
Hildebrandt, GitHub issue 2930.

Revision 1.89 / (download) - annotate - [select for diffs], Mon Oct 11 13:27:50 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.88: +9 -6 lines
Diff to previous 1.88 (colored)

Make positions hidden by overlays range-based rather than character-based,
from Anindya Mukherjee.

Revision 1.88 / (download) - annotate - [select for diffs], Fri Aug 13 18:54:54 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.87: +4 -3 lines
Diff to previous 1.87 (colored)

Add a menu when a popup is present (mouse only for now).

Revision 1.87 / (download) - annotate - [select for diffs], Wed Aug 11 20:49:55 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.86: +9 -11 lines
Diff to previous 1.86 (colored)

Break the colour palette into a struct rather than just a single array
and use that to support the OSC palette-setting sequences in popups.
Also add a pane-colours array option to specify the defaults. GitHub
issue 2815.

Revision 1.86 / (download) - annotate - [select for diffs], Wed Aug 11 09:05:21 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.85: +15 -4 lines
Diff to previous 1.85 (colored)

Return to applying pane-border-style to the area outside panes, GitHub
issue 2816.

Revision 1.85 / (download) - annotate - [select for diffs], Thu Aug 5 09:43:51 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.84: +2 -2 lines
Diff to previous 1.84 (colored)

Do not freeze output in panes when a popup is open, let them continue to
redraw. From Anindya Mukherjee .

Revision 1.84 / (download) - annotate - [select for diffs], Tue Apr 13 05:25:05 2021 UTC (3 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.83: +3 -3 lines
Diff to previous 1.83 (colored)

Move mode set/reset after sync so cursor doesn't flicker, from Avi
Halachmi.

Revision 1.83 / (download) - annotate - [select for diffs], Fri Feb 5 12:29:18 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.82: +20 -6 lines
Diff to previous 1.82 (colored)

Send Unicode directional isolate characters around horizontal pane
borders if the terminal support UTF-8 and an extension terminfo(5)
capability "Bidi" is present. On terminals with BiDi support (ie, VTE)
this seems to be enough to display right-to-left text acceptably enough
to be usable (with some caveats about the mouse position). Requested by
and with help from Mahmoud Elagdar in GitHub issue 2425.

Revision 1.82 / (download) - annotate - [select for diffs], Mon Dec 7 09:46:58 2020 UTC (3 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.81: +4 -8 lines
Diff to previous 1.81 (colored)

Do not include the status line size when working out the character for
the pane status line. GitHub issue 2493.

Revision 1.81 / (download) - annotate - [select for diffs], Wed Jul 22 06:21:46 2020 UTC (3 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored)

Correct checks for window borders.

Revision 1.80 / (download) - annotate - [select for diffs], Sat Jun 27 10:23:10 2020 UTC (3 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.79: +8 -2 lines
Diff to previous 1.79 (colored)

Check for no pane border status line separately from top/bottom.

Revision 1.79 / (download) - annotate - [select for diffs], Tue Jun 23 14:10:43 2020 UTC (3 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.78: +35 -11 lines
Diff to previous 1.78 (colored)

Correctly redraw pane border bottom line when the status line is on and
at the bottom, reported by Kaushal Modi.

Revision 1.78 / (download) - annotate - [select for diffs], Sat May 16 16:26:34 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.77: +96 -35 lines
Diff to previous 1.77 (colored)

Add an option to set the pane border lines style from a choice of single
lines (ACS or UTF-8), double or heavy (UTF-8), simple (plain ASCII) or
number (the pane numbers). Lines that won't work on a non-UTF-8 terminal
are translated back into ACS when they are output.

Revision 1.77 / (download) - annotate - [select for diffs], Sat May 16 16:20:59 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.76: +9 -8 lines
Diff to previous 1.76 (colored)

Add a client flag 'active-pane' which stores the active pane in the
client and allows it to be changed independently from the real active
pane stored in the window. This is can be used with session groups which
allow an independent current window (although it would be nice to have a
flag for this too and remove session groups). The client active pane is
only really useful interactively, many things (hooks, window-style,
zooming) still use the window active pane.

Revision 1.76 / (download) - annotate - [select for diffs], Sat May 16 15:34:08 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.75: +13 -7 lines
Diff to previous 1.75 (colored)

Do not hoke into struct window_pane from the tty code and instead set
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.

Revision 1.75 / (download) - annotate - [select for diffs], Sat May 16 15:01:31 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.74: +264 -173 lines
Diff to previous 1.74 (colored)

Drop having a separate type for style options and make them all strings,
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.

Revision 1.74 / (download) - annotate - [select for diffs], Sat May 16 14:42:06 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.73: +6 -1 lines
Diff to previous 1.73 (colored)

Do not redraw or update mode if nothing has changed.

Revision 1.73 / (download) - annotate - [select for diffs], Mon Apr 20 14:59:31 2020 UTC (4 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.72: +1 -3 lines
Diff to previous 1.72 (colored)

Change how sync works to always send the end sequence after all output
is done when we are returning to the event loop (since we always move
the cursor at that point). Also a man fix from jmc.

Revision 1.72 / (download) - annotate - [select for diffs], Sat Apr 18 21:35:32 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.71: +1 -3 lines
Diff to previous 1.71 (colored)

The PANE_REDRAW flag bit might be needed by other panes so we can't
clear it on the first redraw, and it can't be set when we are finished
or they would be redrawn again, so if the redraw is deferred for a
client, copy the redraw flag into a separate set of bits just for that
client.

Revision 1.71 / (download) - annotate - [select for diffs], Sat Apr 18 07:32:53 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.70: +3 -1 lines
Diff to previous 1.70 (colored)

Bring back previons fix to only redraw panes that need it after a redraw
is deferred, but clear the pane flags when they are actually redrawn
rather than every time.

Revision 1.70 / (download) - annotate - [select for diffs], Sat Apr 18 06:20:50 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.69: +11 -4 lines
Diff to previous 1.69 (colored)

Add a flag to protect against nested syncs and add some extra logging to
redrawing.

Revision 1.69 / (download) - annotate - [select for diffs], Sat Apr 18 06:15:07 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.68: +4 -11 lines
Diff to previous 1.68 (colored)

Revert previous, there is still a problem.

Revision 1.68 / (download) - annotate - [select for diffs], Sat Apr 18 06:10:15 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.67: +11 -4 lines
Diff to previous 1.67 (colored)

When a redraw is deferred because the terminal hasn't finished reading
the data from the last one, other panes could update while waiting, so
we set the flag to redraw them all when the new redraw actually
happened. But this means a lot of redrawing panes unnecessarily if they
haven't changed - so instead set a flag to say "at least one pane needs
to be redrawed" then look at the invidual pane flags to see which ones
need it.

Revision 1.67 / (download) - annotate - [select for diffs], Thu Apr 16 13:35:24 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.66: +7 -1 lines
Diff to previous 1.66 (colored)

Add support for the iTerm2 sychronized updates escape sequence which
drastically reduces flickering.

Revision 1.66 / (download) - annotate - [select for diffs], Tue Mar 24 08:09:44 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.65: +3 -1 lines
Diff to previous 1.65 (colored)

Add support for overlay popup boxes to show text or output temporarily
above the normal layout. These work similarly to menus and are created
with the display-popup command.

Revision 1.65 / (download) - annotate - [select for diffs], Wed Jul 24 21:16:17 2019 UTC (4 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.64: +2 -2 lines
Diff to previous 1.64 (colored)

Mark pane status line jobs with FORMAT_STATUS also so it redraws when
they finish, GitHub issue 1852.

Revision 1.64 / (download) - annotate - [select for diffs], Wed Jun 26 13:03:47 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.63: +10 -14 lines
Diff to previous 1.63 (colored)

Add #define for the pane status line option position numbers.

Revision 1.63 / (download) - annotate - [select for diffs], Sun May 26 18:27:52 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.62: +5 -2 lines
Diff to previous 1.62 (colored)

Always redraw overlay if it is on (so status line doesn't redraw over it).

Revision 1.62 / (download) - annotate - [select for diffs], Wed May 8 18:07:12 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored)

Add a flag to redraw only the overlay, and remove the overlay on resize.

Revision 1.61 / (download) - annotate - [select for diffs], Tue May 7 20:01:41 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.60: +25 -160 lines
Diff to previous 1.60 (colored)

Move around the display-panes identify code to make it a bit more
generic and hide the display-panes specific bits into
cmd-display-panes.c.

Revision 1.60 / (download) - annotate - [select for diffs], Wed Apr 17 14:41:08 2019 UTC (5 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.59: +5 -2 lines
Diff to previous 1.59 (colored)

Do not let the size of the pane status screen go negative.

Revision 1.59 / (download) - annotate - [select for diffs], Mon Mar 18 20:53:33 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.58: +15 -15 lines
Diff to previous 1.58 (colored)

Extend the #[] style syntax and use that together with previous format
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.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Mar 16 19:12:13 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored)

Use a pointer for the active screen in the status line instead of
copying them around all the time.

Revision 1.57 / (download) - annotate - [select for diffs], Sat Mar 16 17:14:07 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

Tidy and rename some bits of status line code.

Revision 1.56 / (download) - annotate - [select for diffs], Tue Mar 12 20:02:47 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored)

DECRC and DECSC apparently need to preserve origin mode as well, based
on a fix from Marc Reisner.

Revision 1.55 / (download) - annotate - [select for diffs], Thu Oct 18 08:38:01 2018 UTC (5 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.54: +186 -98 lines
Diff to previous 1.54 (colored)

Support for windows larger than visible on the attached client. This has
been a limitation for a long time.

There are two new options, window-size and default-size, and a new
command, resize-window. The force-width and force-height options and the
session_width and session_height formats have been removed.

The new window-size option tells tmux how to work out the size of
windows: largest means it picks the size of the largest session,
smallest the smallest session (similar to the old behaviour) and manual
means that it does not automatically resize windows. The default is
currently largest but this may change. aggressive-resize modifies the
choice of session for largest and smallest as it did before.

If a window is in a session attached to a client that is too small, only
part of the window is shown. tmux attempts to keep the cursor visible,
so the part of the window displayed is changed as the cursor moves (with
a small delay, to try and avoid excess redrawing when applications
redraw status lines or similar that are not currently visible). The
offset of the visible portion of the window is shown in status-right.

Drawing windows which are larger than the client is not as efficient as
those which fit, particularly when the cursor moves, so it is
recommended to avoid using this on slow machines or networks (set
window-size to smallest or manual).

The resize-window command can be used to resize a window manually. If it
is used, the window-size option is automatically set to manual for the
window (undo this with "setw -u window-size"). resize-window works in a
similar way to resize-pane (-U -D -L -R -x -y flags) but also has -a and
-A flags. -a sets the window to the size of the smallest client (what it
would be if window-size was smallest) and -A the largest.

For the same behaviour as force-width or force-height, use resize-window
-x or -y, and "setw -u window-size" to revert to automatic sizing..

If the global window-size option is set to manual, the default-size
option is used for new windows. If -x or -y is used with new-session,
that sets the default-size option for the new session.

The maximum size of a window is 10000x10000. But expect applications to
complain and much higher memory use if making a window excessively
big. The minimum size is the size required for the current layout
including borders.

The refresh-client command can be used to pan around a window, -U -D -L
-R moves up, down, left or right and -c returns to automatic cursor
tracking. The position is reset when the current window is changed.

Revision 1.54 / (download) - annotate - [select for diffs], Sun Aug 19 20:13:07 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.53: +13 -10 lines
Diff to previous 1.53 (colored)

Add a flag to force redrawing of the status line even if the content
hasn't changed, needed for resizing.

Revision 1.53 / (download) - annotate - [select for diffs], Sun Aug 19 16:45:03 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.52: +29 -31 lines
Diff to previous 1.52 (colored)

Add a client redraw-window flag instead of the redraw-all flag and for
all just use the three flags together (window, borders, status).

Revision 1.52 / (download) - annotate - [select for diffs], Sat Aug 18 16:14:03 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.51: +30 -39 lines
Diff to previous 1.51 (colored)

Some tidying and helper functions.

Revision 1.51 / (download) - annotate - [select for diffs], Tue Aug 14 11:38:05 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.50: +18 -13 lines
Diff to previous 1.50 (colored)

Add size to arguments struct too.

Revision 1.50 / (download) - annotate - [select for diffs], Tue Aug 14 11:31:34 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.49: +103 -75 lines
Diff to previous 1.49 (colored)

Some tidying, use a struct for arguments (there will be more later) and
add a helper function.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Feb 5 08:21:54 2018 UTC (6 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.48: +2 -2 lines
Diff to previous 1.48 (colored)

Add struct status_line to hold status line members of struct client, not
used yet but will be soon. From Thomas Adam.

Revision 1.48 / (download) - annotate - [select for diffs], Fri Dec 22 23:16:41 2017 UTC (6 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.47: +3 -1 lines
Diff to previous 1.47 (colored)

Fix memory leak in screen_redraw_make_pane_status.

Revision 1.47 / (download) - annotate - [select for diffs], Mon Oct 16 19:30:53 2017 UTC (6 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.46: +53 -37 lines
Diff to previous 1.46 (colored)

Infrastructure for drawing status lines of more than one line in height,
still only one is allowed but this lets tmux draw bigger ones.

Revision 1.46 / (download) - annotate - [select for diffs], Mon May 1 12:20:55 2017 UTC (7 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

In order that people can use formats like #D in #() in the status line
and not have to wait for an update when they change pane, we allow
commands to run more than once a second if the expanded form
changes. Unfortunately this can mean them being run far too often
(pretty much continually) when multiple clients exist, because some
formats (including #D) will always differ between clients.

To avoid this, give each client its own tree of jobs which means that
the same command will be different instances for each client - similar
to how we have the tag to separate commands for different panes.

GitHub issue 889; test case reported by Paul Johnson.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Apr 5 10:49:46 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

Give each client a name. This defaults to the tty name as before but
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.

Revision 1.44 / (download) - annotate - [select for diffs], Wed Feb 8 15:41:41 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.43: +4 -1 lines
Diff to previous 1.43 (colored)

Add a helper to store a cell, and some tidying.

Revision 1.43 / (download) - annotate - [select for diffs], Fri Feb 3 11:57:27 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

Add a window or pane id "tag" to each format tree and use it to separate
jobs, this means that if the same job is used for different windows or
panes (for example in pane-border-format), it will be run separately for
each pane.

Revision 1.42 / (download) - annotate - [select for diffs], Sat Jan 7 15:28:13 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.41: +5 -1 lines
Diff to previous 1.41 (colored)

Add support for the OSC 4 and OSC 104 palette setting escape sequences,
from S Gilles.

Revision 1.41 / (download) - annotate - [select for diffs], Thu Oct 13 20:27:27 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

Add support for BCE (background colour erase). This makes various escape
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.

Revision 1.40 / (download) - annotate - [select for diffs], Wed Oct 12 17:36:52 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.39: +13 -4 lines
Diff to previous 1.39 (colored)

Compare to see if pane status line has actually changed, not just size, and
do not draw if pane is not visible.

Revision 1.39 / (download) - annotate - [select for diffs], Mon Oct 10 21:29:23 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.38: +29 -27 lines
Diff to previous 1.38 (colored)

Loads more static, except for cmd-*.c and window-*.c.

Revision 1.38 / (download) - annotate - [select for diffs], Sun Oct 9 16:24:34 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.37: +36 -14 lines
Diff to previous 1.37 (colored)

Make the CLIENT_STATUS flag imply that pane status lines are redrawn if
they are enabled and break the actual screen generation code into a
separate function. Fixes problems reported by Romain Francoise.

Revision 1.37 / (download) - annotate - [select for diffs], Fri Jul 15 00:42:56 2016 UTC (7 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.36: +5 -5 lines
Diff to previous 1.36 (colored)

Instead of representing colours in several different forms with various
cell flags, convert to use an int with flags marking 256 or RGB colours
in the top byte (except in cells, which we don't want to make any
bigger). From Brad Town.

Revision 1.36 / (download) - annotate - [select for diffs], Fri Apr 29 15:00:48 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.35: +152 -25 lines
Diff to previous 1.35 (colored)

Add option to include status text in the pane borders. If
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.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Jan 19 15:59:12 2016 UTC (8 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

I no longer use my SourceForge address so replace it.

Revision 1.34 / (download) - annotate - [select for diffs], Tue Dec 15 00:00:01 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

Make the marked pane a cmd_find_state.

Revision 1.33 / (download) - annotate - [select for diffs], Tue Oct 27 15:58:42 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.32: +4 -4 lines
Diff to previous 1.32 (colored)

Move struct options into options.c.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Jun 4 11:43:51 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.31: +31 -15 lines
Diff to previous 1.31 (colored)

Add support for a single "marked pane". There is one marked pane in the
server at a time; it may be toggled or cleared with select-pane -m and
-M (the border is highlighted). A new target '~' or '{marked}' specifies
the marked pane to commands and it is the default target for the
swap-pane and join-pane -s flag (this makes them much simpler to use -
mark the source pane and then change to the target pane to run swapp or
joinp).

Revision 1.31 / (download) - annotate - [select for diffs], Thu May 7 07:16:14 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.30: +7 -4 lines
Diff to previous 1.30 (colored)

If status line is at the top, the offset needs to be adjusted when
drawing pane numbers.  Based on a diff from John O'Meara.

Revision 1.30 / (download) - annotate - [select for diffs], Sun Apr 19 21:05:27 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.29: +10 -12 lines
Diff to previous 1.29 (colored)

Support setting the default window and pane background colours (window
and active pane via window-style and window-active-style options, an
individual pane by a new select-pane -P flag). From J Raynor.

Revision 1.29 / (download) - annotate - [select for diffs], Fri Feb 6 15:09:34 2015 UTC (9 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

Move pane border options to window options rather than session, from Marc Finet.

Revision 1.28 / (download) - annotate - [select for diffs], Fri Nov 14 02:19:47 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.27: +42 -3 lines
Diff to previous 1.27 (colored)

Label windows which are smaller than expected with a reason.

Revision 1.27 / (download) - annotate - [select for diffs], Mon Mar 31 21:34:08 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

Having three *clock* files is ridiculous, remove clock.c.

Revision 1.26 / (download) - annotate - [select for diffs], Fri Jan 31 14:19:24 2014 UTC (10 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.25: +69 -62 lines
Diff to previous 1.25 (colored)

Break up and simplify screen_redraw_screen.

Revision 1.25 / (download) - annotate - [select for diffs], Tue Jan 28 23:07:09 2014 UTC (10 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.24: +7 -15 lines
Diff to previous 1.24 (colored)

Allow replacing each of the many sets of separate foo-{fg,bg,attr}
options with a single foo-style option. For example:

    set -g status-fg yellow
    set -g status-bg red
    set -g status-attr blink

Becomes:

    set -g status-style fg=yellow,bg=red,blink

The -a flag to set can be used to add to rather than replace a style. So:

    set -g status-bg red

Becomes:

    set -ag status-style bg=red

Currently this is fully backwards compatible (all *-{fg,bg,attr} options
remain) but the plan is to deprecate them over time.

From Tiago Cunha.

Revision 1.24 / (download) - annotate - [select for diffs], Mon Mar 25 11:41:49 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.23: +54 -5 lines
Diff to previous 1.23 (colored)

When only two panes in a window, only draw half the separating line as
active.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Mar 25 10:12:01 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.22: +4 -1 lines
Diff to previous 1.22 (colored)

Do not redraw panes if invisible.

Revision 1.22 / (download) - annotate - [select for diffs], Wed May 23 19:19:40 2012 UTC (11 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.21: +5 -8 lines
Diff to previous 1.21 (colored)

Use a predefined structure for not-space cells used to set attributes.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jan 29 09:37:02 2012 UTC (12 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.20: +44 -19 lines
Diff to previous 1.20 (colored)

Add an option to move the status line to the top of the screen,
requested by many.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Jan 21 23:45:44 2012 UTC (12 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.19: +19 -10 lines
Diff to previous 1.19 (colored)

Show pane size in top right of display panes mode.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Nov 15 23:19:51 2011 UTC (12 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.18: +4 -3 lines
Diff to previous 1.18 (colored)

Make window_pane_index work the same as window_index, from Ben Boeckel.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Jul 8 21:51:40 2011 UTC (12 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.17: +5 -1 lines
Diff to previous 1.17 (colored)

Do not continue to send data to suspended/locked clients or there will
be a huge rush of it after they are resumed/unlocked. The main output
path was fine but status line updates and the terminal state reset code
were missed.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Sep 11 16:19:22 2010 UTC (13 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.16: +5 -14 lines
Diff to previous 1.16 (colored)

Use UTF-8 line drawing characters on UTF-8 terminals. Fixes some stupid
terminals (I'm looking at you, putty) which disable the vt100 ACS mode
switching sequences in UTF-8 mode.

Also on terminals without ACS at all, use ASCII equivalents where
obvious.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Feb 4 18:20:16 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.15: +15 -6 lines
Diff to previous 1.15 (colored)

Option to display the active pane in a different colour with the display-panes
command. From Paul Hoffman, thanks.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Jan 3 12:51:05 2010 UTC (14 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.14: +65 -34 lines
Diff to previous 1.14 (colored)

Options to set the colour of the pane borders, with different colours for the
active pane.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Dec 3 22:50:10 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.13: +6 -6 lines
Diff to previous 1.13 (colored)

Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last
time now I've configured emacs to make them displayed in really annoying
colours...

Revision 1.13 / (download) - annotate - [select for diffs], Wed Oct 28 08:52:36 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.12: +3 -1 lines
Diff to previous 1.12 (colored)

Add a minor optimisatin: if the character being printed is space, don't worry
about setting the background colour or attributes (except reverse).

Revision 1.12 / (download) - annotate - [select for diffs], Mon Oct 12 09:29:58 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.11: +8 -7 lines
Diff to previous 1.11 (colored)

Similarly add a tty_cursor_pane function to tidy up most of the calls.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Sep 10 17:16:24 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.10: +6 -7 lines
Diff to previous 1.10 (colored)

Permit options such as status-bg to be configured using the entire 256 colour
palette by setting "colour0" to "colour255".

Revision 1.10 / (download) - annotate - [select for diffs], Mon Aug 31 20:46:19 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.9: +57 -1 lines
Diff to previous 1.9 (colored)

Add a new display-panes command, with two options (display-panes-colour and
display-panes-time), which displays a visual indication of the number of each
pane.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Aug 10 19:42:03 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.8: +4 -1 lines
Diff to previous 1.8 (colored)

Reset the attributes after drawing all or part of the screen, and reset the
region before poll(2). This reduces (but does not eliminate) the chance of the
attributes not being normal if tmux is disconnected without warning (ssh ~.,
reboot from inside, etc).

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jul 31 10:12:49 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.7: +10 -5 lines
Diff to previous 1.7 (colored)

Pass the ACS border characters through tty_get_acs so they appear correctly on
terminals which don't use the standard set.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Jul 24 19:14:38 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.6: +102 -20 lines
Diff to previous 1.6 (colored)

Use the full range of ACS line drawing characters to draw pane borders,
including intersections.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Jul 24 16:21:42 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.5: +27 -75 lines
Diff to previous 1.5 (colored)

Simplify screen redrawing by drawing the border and background together rather
than border separately, and consolidating all the drawing characters into one
string.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Jul 14 19:11:58 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

For some reason when clearing status/message it was redrawing the entire client
not just the status line. Changing this also revealed the check for the status
line was incorrect when drawing the pane.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jul 14 19:03:16 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.3: +36 -20 lines
Diff to previous 1.3 (colored)

Instead of faking up a status line in status_redraw, use the same code to
redraw it as to draw the entire screen, just skip all lines but the last.

This makes horizontal split redraw properly when the status line is off.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jul 14 07:23:36 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.2: +5 -2 lines
Diff to previous 1.2 (colored)

Get rid of the PANE_HIDDEN flag in favour of a function, and moving the
decision for whether or not a pane should be drawn out of the layout code and
into the redraw code.

This is needed for the new layout design, getting it in now to make that easier
to work on.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Jun 25 05:56:44 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.1: +1 -3 lines
Diff to previous 1.1 (colored)

Unused variables. Found by lint, no binary change.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jun 1 22:58:49 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN

Import tmux, a terminal multiplexor allowing (among other things) a single
terminal to be switched between several different windows and programs
displayed on one terminal be detached from one terminal and moved to another.

ok deraadt pirofti

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.