OpenBSD CVS

CVS log for src/usr.bin/tmux/tty.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.436 / (download) - annotate - [select for diffs], Tue May 14 10:11:09 2024 UTC (5 days, 3 hours ago) by nicm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.435: +4 -3 lines
Diff to previous 1.435 (colored)

Add missing time.h to tty.c (from Ismail Donmez), also remove some stray
spaces.

Revision 1.435 / (download) - annotate - [select for diffs], Fri Sep 15 15:49:05 2023 UTC (8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.434: +4 -1 lines
Diff to previous 1.434 (colored)

Change UTF-8 combining to inspect the previous character at the cursor
position rather than keeping the last character from the input stream,
this is how most terminals work and fixes problems with displaying these
characters in vim. GitHub issue 3600.

Revision 1.434 / (download) - annotate - [select for diffs], Sat Sep 2 20:03:10 2023 UTC (8 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.433: +23 -5 lines
Diff to previous 1.433 (colored)

Request terminal colours again on SIGWINCH but at most once every 30
seconds, GitHub issue 3582.

Revision 1.433 / (download) - annotate - [select for diffs], Sat Sep 2 09:17:23 2023 UTC (8 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.432: +18 -8 lines
Diff to previous 1.432 (colored)

Setulc only does RGB colour so add Setulc1 to do non-RGB colours, GitHub
issue 3627.

Revision 1.432 / (download) - annotate - [select for diffs], Thu Jul 13 06:03:48 2023 UTC (10 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.431: +5 -4 lines
Diff to previous 1.431 (colored)

Use 8 for underscore colour defaults instead of 0 which is less
confusing, and fix writing tge default colour. GitHub issue 3627.

Revision 1.431 / (download) - annotate - [select for diffs], Mon Jun 26 07:17:40 2023 UTC (10 months, 3 weeks ago) by nicm
Branch: MAIN
Changes since 1.430: +11 -4 lines
Diff to previous 1.430 (colored)

Add "us" to styles for underscore colour, GitHub issue 3589.

Revision 1.430 / (download) - annotate - [select for diffs], Tue Apr 25 09:31:50 2023 UTC (12 months, 3 weeks ago) by nicm
Branch: MAIN
Changes since 1.429: +63 -63 lines
Diff to previous 1.429 (colored)

Tidy tparm wrapper functions to have more obvious names and check tparm
return value.

Revision 1.429 / (download) - annotate - [select for diffs], Tue Apr 25 09:24:44 2023 UTC (12 months, 3 weeks ago) by nicm
Branch: MAIN
Changes since 1.428: +3 -1 lines
Diff to previous 1.428 (colored)

Invalidate cached tty state after changing features since they may
change what the terminal can do and need mouse sequences or similar to
be sent again, GitHub issue 3513.

Revision 1.428 / (download) - annotate - [select for diffs], Mon Mar 27 08:31:32 2023 UTC (13 months, 3 weeks ago) by nicm
Branch: MAIN
Changes since 1.427: +15 -14 lines
Diff to previous 1.427 (colored)

For passthrough, don't write to clients attached to different sessions,
based on a fix from Sergei Grechanik.

Revision 1.427 / (download) - annotate - [select for diffs], Thu Jan 12 18:49:11 2023 UTC (16 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.426: +5 -9 lines
Diff to previous 1.426 (colored)

Have tmux recognise pasted texts wrapped in bracket paste sequences,
rather than only forwarding them to the program inside. From Andrew
Onyshchuk in GitHub issue 3431.

Revision 1.426 / (download) - annotate - [select for diffs], Tue Jan 3 11:43:24 2023 UTC (16 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.425: +8 -4 lines
Diff to previous 1.425 (colored)

Query the client terminal for foreground and background colours and if
OSC 10 or 11 is received but no colour has been set inside tmux, return
the colour from the first attached client (probably most people will
have all light or or all dark terminals).

Revision 1.425 / (download) - annotate - [select for diffs], Fri Nov 11 08:37:55 2022 UTC (18 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.424: +7 -5 lines
Diff to previous 1.424 (colored)

Parse primary device attributes as well as secondary and add a SIXEL
flag (not used yet), from Anindya Mukherjee.

Revision 1.424 / (download) - annotate - [select for diffs], Mon Aug 15 08:54:03 2022 UTC (21 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.423: +6 -4 lines
Diff to previous 1.423 (colored)

Add a Nobr terminfo capability to tell tmux the terminal does not use
bright colours for bold (makes a difference to how tmux applies palette
differences). From Damien Tardy-Panis in GitHub issue 3301.

Revision 1.423 / (download) - annotate - [select for diffs], Tue Aug 2 11:09:26 2022 UTC (21 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.422: +15 -8 lines
Diff to previous 1.422 (colored)

Add a third state "all" to allow-passthrough to work even in invisible
panes, from Sergei Grechanik in GitHub issue 3274.

Revision 1.422 / (download) - annotate - [select for diffs], Wed Jul 6 07:36:36 2022 UTC (22 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.421: +2 -2 lines
Diff to previous 1.421 (colored)

Support hyperlinks with capture-pane -e and add a mouse_hyperlink
format, GitHub issue 3247 from Jeff Chiang.

Revision 1.421 / (download) - annotate - [select for diffs], Thu Jun 30 09:55:53 2022 UTC (22 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.420: +83 -33 lines
Diff to previous 1.420 (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.420 / (download) - annotate - [select for diffs], Thu Jun 9 09:12:55 2022 UTC (23 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.419: +6 -5 lines
Diff to previous 1.419 (colored)

If an application gives the first parameter to OSC 52, validate and pass
on to outside terminal. GitHub issue 3192.

Revision 1.419 / (download) - annotate - [select for diffs], Fri Jun 3 08:09:16 2022 UTC (23 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.418: +2 -2 lines
Diff to previous 1.418 (colored)

Do not unintentionally turn off all mouse mode when button is also present.

Revision 1.418 / (download) - annotate - [select for diffs], Thu Mar 24 09:05:57 2022 UTC (2 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.417: +13 -1 lines
Diff to previous 1.417 (colored)

Add a capability for OSC 7 and use it similarly to how the title is set
(and controlled by the same set-titles option). GitHub issue 3127.

Revision 1.417 / (download) - annotate - [select for diffs], Tue Mar 8 12:01:19 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.416: +12 -7 lines
Diff to previous 1.416 (colored)

Add argument to refresh-client -l to forward clipboard to a pane. GitHub
issue 3068.

Revision 1.416 / (download) - annotate - [select for diffs], Tue Feb 15 13:03:02 2022 UTC (2 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.415: +27 -2 lines
Diff to previous 1.415 (colored)

Do not create a buffer from an OSC 52 response if we have not sent a
query.

Revision 1.415 / (download) - annotate - [select for diffs], Fri Dec 31 11:35:49 2021 UTC (2 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.414: +10 -17 lines
Diff to previous 1.414 (colored)

Try to turn on less-capable mouse modes when turning on more-capable, to
increase the chances we get something even if the terminal doesn't support
the one we really want. GitHub issue 3020.

Revision 1.414 / (download) - annotate - [select for diffs], Fri Dec 10 12:42:37 2021 UTC (2 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.413: +8 -2 lines
Diff to previous 1.413 (colored)

Add a NOBLOCK flag rather than adding amount to wait for when
dealing with potentially-long sequences. GitHub issue 3001.

Revision 1.413 / (download) - annotate - [select for diffs], Mon Dec 6 10:08:42 2021 UTC (2 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.412: +4 -2 lines
Diff to previous 1.412 (colored)

Do not dereference NULL window when resizing client, GitHub issue 2982.

Revision 1.412 / (download) - annotate - [select for diffs], Mon Nov 29 11:05:28 2021 UTC (2 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.411: +2 -2 lines
Diff to previous 1.411 (colored)

Bump response timer to three seconds, GitHub issue 2984.

Revision 1.411 / (download) - annotate - [select for diffs], Wed Nov 3 13:37:17 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.410: +37 -19 lines
Diff to previous 1.410 (colored)

Add a cursor-style option, from Alexis Hildebrandt in GitHub issue 2960.

Revision 1.410 / (download) - annotate - [select for diffs], Mon Nov 1 09:34:49 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.409: +29 -16 lines
Diff to previous 1.409 (colored)

Add a cursor-colour option, from Alexis Hildebrandt in GitHub issue
2959.

Revision 1.409 / (download) - annotate - [select for diffs], Thu Oct 28 18:57:06 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.408: +13 -5 lines
Diff to previous 1.408 (colored)

Do not force the cursor to move if it is in the automargin space at EOL
and that is where we want it to be, GitHub issue 2956.

Revision 1.408 / (download) - annotate - [select for diffs], Mon Oct 25 09:22:17 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.407: +4 -5 lines
Diff to previous 1.407 (colored)

Instead of setting the popup default colours in the draw callback, set
it up in popup_display and follow the same routine as panes in the draw
and init_ctx callbacks - use the palette if the option value is default.
Allows application-set fg and bg to work in panes again.

Revision 1.407 / (download) - annotate - [select for diffs], Thu Oct 14 09:54:51 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.406: +14 -9 lines
Diff to previous 1.406 (colored)

When checking ranges in tty_cmd_cells, cannot use the tty cursor
position and tty_cursor because it may be at the final invisible cursor
position on automargin terminals. The text to be drawn is confined to
the pane, so use the pane cursor position for the checks instead. Fix
from Anindya Mukherjee, redraw problem reported by naddy@.

Revision 1.406 / (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.405: +82 -51 lines
Diff to previous 1.405 (colored)

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

Revision 1.405 / (download) - annotate - [select for diffs], Wed Oct 6 10:33:12 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.404: +7 -5 lines
Diff to previous 1.404 (colored)

Do not reset cursor to default if it has never been changed, fixes
problem reported by naddy.

Revision 1.404 / (download) - annotate - [select for diffs], Tue Oct 5 12:46:02 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.403: +77 -84 lines
Diff to previous 1.403 (colored)

Separate "very visible" flag from blinking flag, it should not affect
DECSCUSR. GitHub issue 2891.

Revision 1.403 / (download) - annotate - [select for diffs], Tue Aug 17 11:20:13 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.402: +2 -2 lines
Diff to previous 1.402 (colored)

calloc for confirm-before data since the item needs to start NULL.

Revision 1.402 / (download) - annotate - [select for diffs], Tue Aug 17 08:44:52 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.401: +16 -3 lines
Diff to previous 1.401 (colored)

Be more sophisticated about enabling synchronized updates when there is
an overlay and treat it like the active pane (use for commands which
move the cursor only). When there is an overlay also use it for all
panes and not just the active pane. GitHub issue 2826.

Revision 1.401 / (download) - annotate - [select for diffs], Fri Aug 13 18:54:54 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.400: +2 -2 lines
Diff to previous 1.400 (colored)

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

Revision 1.400 / (download) - annotate - [select for diffs], Thu Aug 12 19:47:05 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.399: +10 -5 lines
Diff to previous 1.399 (colored)

Evaluate styles with the pane variables.

Revision 1.399 / (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.398: +33 -43 lines
Diff to previous 1.398 (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.398 / (download) - annotate - [select for diffs], Wed Aug 11 07:51:31 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.397: +2 -1 lines
Diff to previous 1.397 (colored)

OSC 52 can be long enough to make tmux think the output buffer is too
big, so treat it as a redraw. GitHub issue 2814.

Revision 1.397 / (download) - annotate - [select for diffs], Fri Aug 6 07:32:21 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.396: +9 -3 lines
Diff to previous 1.396 (colored)

Another minor fix - do not draw positions that are under the popup with
spaces, from Anindya Mukherjee. Also a typo fix from Linus Arver.

Revision 1.396 / (download) - annotate - [select for diffs], Fri Aug 6 03:29:15 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.395: +9 -8 lines
Diff to previous 1.395 (colored)

Tweak previous not to replace complete characters with spaces.

Revision 1.395 / (download) - annotate - [select for diffs], Fri Aug 6 03:13:05 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.394: +20 -13 lines
Diff to previous 1.394 (colored)

Correctly draw wide characters that are partially obscured.

Revision 1.394 / (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.393: +90 -19 lines
Diff to previous 1.393 (colored)

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

Revision 1.393 / (download) - annotate - [select for diffs], Thu Jun 10 07:59:31 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.392: +3 -8 lines
Diff to previous 1.392 (colored)

Do not clear region based on current cursor position, this is not
necessary anymore and causes problems, GitHub issue 2735.

Revision 1.392 / (download) - annotate - [select for diffs], Thu Jun 10 07:43:44 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.391: +7 -3 lines
Diff to previous 1.391 (colored)

Improve logging of screen mode changes.

Revision 1.391 / (download) - annotate - [select for diffs], Thu Jun 10 07:36:47 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.390: +82 -39 lines
Diff to previous 1.390 (colored)

Change cursor style handling so tmux understands which sequences contain
blinking and sets the flag appropriately, means that it works whether
cnorm disables blinking or not. GitHub issue 2682.

Revision 1.390 / (download) - annotate - [select for diffs], Fri Mar 12 08:39:17 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.389: +26 -14 lines
Diff to previous 1.389 (colored)

Fix so tmux correctly sends the cvvis (cursor very visible) capability
rather than sending it and then immediately undoing it with cnorm. Also
turn it off when the cursor shape is changed like xterm.

Revision 1.389 / (download) - annotate - [select for diffs], Wed Feb 17 07:18:36 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.388: +3 -3 lines
Diff to previous 1.388 (colored)

Move the call to setupterm() into the client and have it pass the
results to the server over imsg, means the server does not need to enter
ncurses or read terminfo db. Old clients will not work with a new
server.

Revision 1.388 / (download) - annotate - [select for diffs], Mon Jan 18 10:27:54 2021 UTC (3 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.387: +2 -13 lines
Diff to previous 1.387 (colored)

There is no need to clear every line entirely before drawing to it, this
means moving the cursor and messes up wrapping. Better to just clear the
sections that aren't written over. GitHub issue 2537.

Revision 1.387 / (download) - annotate - [select for diffs], Thu Dec 3 07:12:12 2020 UTC (3 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.386: +3 -3 lines
Diff to previous 1.386 (colored)

Redraw any visible modes when status line changes so that formats like
the pane title are updated. GitHub issue 2487. Also a man page fix from
jmc.

Revision 1.386 / (download) - annotate - [select for diffs], Mon Nov 9 10:54:28 2020 UTC (3 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.385: +13 -15 lines
Diff to previous 1.385 (colored)

If mouse bits change, clear them all and set again to avoid problems
with some bits implying others. GitHub issue 2458.

Revision 1.385 / (download) - annotate - [select for diffs], Mon Oct 5 09:53:01 2020 UTC (3 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.384: +24 -10 lines
Diff to previous 1.384 (colored)

Use the setal capability as well as (tmux's) Setulc.

Revision 1.384 / (download) - annotate - [select for diffs], Wed Sep 2 17:19:58 2020 UTC (3 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.383: +3 -3 lines
Diff to previous 1.383 (colored)

Check started flag before looking for capability.

Revision 1.383 / (download) - annotate - [select for diffs], Wed Sep 2 13:46:36 2020 UTC (3 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.382: +16 -8 lines
Diff to previous 1.382 (colored)

Add a -w flag to set- and load-buffer to send to clipboard using OSC 52.
GitHub issue 2363.

Revision 1.382 / (download) - annotate - [select for diffs], Fri Jun 5 09:32:15 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.381: +10 -10 lines
Diff to previous 1.381 (colored)

Fix various confusion about am vs xenl.

Revision 1.381 / (download) - annotate - [select for diffs], Tue Jun 2 20:51:46 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.380: +6 -5 lines
Diff to previous 1.380 (colored)

Move the code to set up a padding cell into grid.c.

Revision 1.380 / (download) - annotate - [select for diffs], Sun May 24 09:13:06 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.379: +33 -38 lines
Diff to previous 1.379 (colored)

Now the tty has a pointer back to the client there is no point (and a
bit confusing) in it keeping a copy of the fd as well. Remove it.

Revision 1.379 / (download) - annotate - [select for diffs], Fri May 22 15:08:38 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.378: +2 -2 lines
Diff to previous 1.378 (colored)

xterm* can have focus too.

Revision 1.378 / (download) - annotate - [select for diffs], Sat May 16 16:44:54 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.377: +11 -12 lines
Diff to previous 1.377 (colored)

Add a terminal feature for enable/disable extended keys (supported by
xterm and mintty) and add an option to make tmux send it. Only forward
extended keys if the application has requested them, even though we use
the CSI u sequence and xterm uses CSI 27 ~ - this is what mintty does as
well.

Revision 1.377 / (download) - annotate - [select for diffs], Sat May 16 16:26:34 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.376: +21 -15 lines
Diff to previous 1.376 (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.376 / (download) - annotate - [select for diffs], Sat May 16 16:20:59 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.375: +3 -4 lines
Diff to previous 1.375 (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.375 / (download) - annotate - [select for diffs], Sat May 16 16:07:55 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.374: +7 -2 lines
Diff to previous 1.374 (colored)

Add a -D flag to ask tmux not to daemonize, useful both for running a
debugger (lldb does not have follow-fork-mode) and for running with a
managed supervisor init system. GitHub issue 2190.

Revision 1.374 / (download) - annotate - [select for diffs], Sat May 16 15:36:57 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.373: +5 -10 lines
Diff to previous 1.373 (colored)

Do not need to work out status line offset, we already have it.

Revision 1.373 / (download) - annotate - [select for diffs], Sat May 16 15:34:08 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.372: +162 -210 lines
Diff to previous 1.372 (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.372 / (download) - annotate - [select for diffs], Sat May 16 15:27:08 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.371: +71 -79 lines
Diff to previous 1.371 (colored)

Rename and tidy some stuff in struct tty_ctx.

Revision 1.371 / (download) - annotate - [select for diffs], Sat May 16 15:01:31 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.370: +15 -3 lines
Diff to previous 1.370 (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.370 / (download) - annotate - [select for diffs], Sat May 16 14:53:23 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.369: +9 -17 lines
Diff to previous 1.369 (colored)

Use a grid cell not a style for the pane style.

Revision 1.369 / (download) - annotate - [select for diffs], Sat May 16 14:46:14 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.368: +4 -4 lines
Diff to previous 1.368 (colored)

Instead of having a default set of terminals in terminal-overrides that
get XT added and using that as a marker for xterm(1)-like, assume that
if the terminfo(5) entry already has XT or the clear capability starts
with CSI then the terminal is VT100-like and it should be safe to send
DA requests. The DA responses trigger additional features being added.

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

Do not redraw or update mode if nothing has changed.

Revision 1.367 / (download) - annotate - [select for diffs], Sat May 16 14:39:40 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.366: +11 -13 lines
Diff to previous 1.366 (colored)

Add feature and capabilities for focus reporting. Also document AX and
XT even though they aren't tmux's, and add some bits for rxvt.

Revision 1.366 / (download) - annotate - [select for diffs], Sat May 16 14:34:44 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.365: +4 -4 lines
Diff to previous 1.365 (colored)

Add a feature for bracketed paste.

Revision 1.365 / (download) - annotate - [select for diffs], Sat May 16 14:22:51 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.364: +6 -9 lines
Diff to previous 1.364 (colored)

Add extension terminfo(5) capabilities for margins.

Revision 1.364 / (download) - annotate - [select for diffs], Sat May 16 14:16:25 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.363: +5 -5 lines
Diff to previous 1.363 (colored)

Remove support for iTerm2's DSR 1337 extension and use the CSI > q
extension now supported by a few different terminals.

Revision 1.363 / (download) - annotate - [select for diffs], Tue Apr 21 06:32:40 2020 UTC (4 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.362: +2 -1 lines
Diff to previous 1.362 (colored)

Do not clear client pane redraw flags until the redraw actually happens.

Revision 1.362 / (download) - annotate - [select for diffs], Mon Apr 20 15:37:32 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.361: +3 -2 lines
Diff to previous 1.361 (colored)

Apply terminal-overrides after terminal detection, it always takes
precedence.

Revision 1.361 / (download) - annotate - [select for diffs], Mon Apr 20 14:59:31 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.360: +17 -11 lines
Diff to previous 1.360 (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.360 / (download) - annotate - [select for diffs], Mon Apr 20 13:38:48 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.359: +3 -3 lines
Diff to previous 1.359 (colored)

Change the Sync capability to be a string instead of a flag.

Revision 1.359 / (download) - annotate - [select for diffs], Mon Apr 20 13:25:36 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.358: +34 -89 lines
Diff to previous 1.358 (colored)

Tidy up the terminal detection and feature code and add named sets of
terminal features, each of which are defined in one place and map to a
builtin set of terminfo(5) capabilities. Features can be specified based
on TERM with a new terminal-features option or with the -T flag when
running tmux. tmux will also detect a few common terminals from the DA
and DSR responses.

This is intended to make it easier to configure tmux's use of
terminfo(5) even in the presence of outdated ncurses(3) or terminfo(5)
databases or for features which do not yet have a terminfo(5) entry.
Instead of having to grok terminfo(5) capability names and what they
should be set to in the terminal-overrides option, the user can
hopefully just give tmux a feature name and let it do the right thing.

The terminal-overrides option remains both for backwards compatibility
and to allow tweaks of individual capabilities.

tmux already did much of this already, this makes it tidier and simpler
to configure.

Revision 1.358 / (download) - annotate - [select for diffs], Sat Apr 18 07:32:54 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.357: +11 -1 lines
Diff to previous 1.357 (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.357 / (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.356: +7 -3 lines
Diff to previous 1.356 (colored)

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

Revision 1.356 / (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.355: +3 -15 lines
Diff to previous 1.355 (colored)

Revert previous, there is still a problem.

Revision 1.355 / (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.354: +15 -3 lines
Diff to previous 1.354 (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.354 / (download) - annotate - [select for diffs], Fri Apr 17 22:16:28 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.353: +4 -1 lines
Diff to previous 1.353 (colored)

Set mode properly before and after redrawing, and don't bother
calculating cursor position if it won't be used.

Revision 1.353 / (download) - annotate - [select for diffs], Fri Apr 17 21:33:18 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.352: +11 -4 lines
Diff to previous 1.352 (colored)

Do not move the cursor to the existing y position if it is invalid, go
home instead.

Revision 1.352 / (download) - annotate - [select for diffs], Fri Apr 17 09:06:10 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.351: +3 -1 lines
Diff to previous 1.351 (colored)

Support the application escape sequence mintty (means tmux doesn't have
to delay to wait for Escape).

Revision 1.351 / (download) - annotate - [select for diffs], Thu Apr 16 15:14:25 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.350: +3 -4 lines
Diff to previous 1.350 (colored)

Send secondary device attributes instead of primary which gives us a bit
more useful information on some terminals.

Revision 1.350 / (download) - annotate - [select for diffs], Thu Apr 16 14:25:35 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.349: +2 -2 lines
Diff to previous 1.349 (colored)

Move the UTF-8 flag to terminal flags.

Revision 1.349 / (download) - annotate - [select for diffs], Thu Apr 16 14:03:51 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.348: +27 -19 lines
Diff to previous 1.348 (colored)

Add a helper function to get the terminal flags.

Revision 1.348 / (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.347: +27 -1 lines
Diff to previous 1.347 (colored)

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

Revision 1.347 / (download) - annotate - [select for diffs], Thu Apr 9 12:16:16 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.346: +17 -7 lines
Diff to previous 1.346 (colored)

Wait until the initial command sequence is done before sending a device
attributes request and other bits that prompt a reply from the terminal.
This means that stray relies are not left on the terminal if the command
has attached and then immediately detached and tmux will not be around
to receive them. Prompted by a problem report from espie@.

Revision 1.346 / (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.345: +17 -4 lines
Diff to previous 1.345 (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.345 / (download) - annotate - [select for diffs], Tue Mar 17 12:20:12 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.344: +1 -3 lines
Diff to previous 1.344 (colored)

Do not return early if no bits changed because may still need to change the style.

Revision 1.344 / (download) - annotate - [select for diffs], Mon Mar 16 10:49:06 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.343: +31 -23 lines
Diff to previous 1.343 (colored)

VTE treats each mouse mode bit as independent, so turning off 1000
doesn't also turn off 1001, so don't rely on that behaviour. GitHub
issue 2116.

Revision 1.343 / (download) - annotate - [select for diffs], Mon Mar 16 09:18:47 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.342: +9 -5 lines
Diff to previous 1.342 (colored)

Turn off mouse mode 1003 as well as the rest when exiting.

Revision 1.342 / (download) - annotate - [select for diffs], Wed Jan 29 15:07:49 2020 UTC (4 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.341: +5 -3 lines
Diff to previous 1.341 (colored)

Do not send DA and DSR again if already have a response.

Revision 1.341 / (download) - annotate - [select for diffs], Tue Jan 28 11:39:51 2020 UTC (4 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.340: +16 -13 lines
Diff to previous 1.340 (colored)

If we can identify the terminal as iTerm2 or as tmux, we can be sure
they support 256 and RGB colours, so set those flags too.

Revision 1.340 / (download) - annotate - [select for diffs], Mon Jan 13 11:59:21 2020 UTC (4 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.339: +18 -1 lines
Diff to previous 1.339 (colored)

Stop handling DA and DSR after a second (they should be the first thing
sent) so this should be plenty.

Revision 1.339 / (download) - annotate - [select for diffs], Mon Jan 13 08:12:53 2020 UTC (4 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.338: +4 -3 lines
Diff to previous 1.338 (colored)

Be more specific in the DSR we are looking for so it doesn't get
confused with mouse sequences. Also set a flag and don't bother checking
for it if we have already seen it (same for DA), and don't check if we
never asked for it.

Revision 1.338 / (download) - annotate - [select for diffs], Sun Jan 12 22:00:20 2020 UTC (4 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.337: +2 -2 lines
Diff to previous 1.337 (colored)

Detect iTerm2 and enable DECSLRM.

Revision 1.337 / (download) - annotate - [select for diffs], Sun Jan 12 21:07:07 2020 UTC (4 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.336: +12 -13 lines
Diff to previous 1.336 (colored)

The terminal type was never as much use as I expected so remove it in
favour of a couple of flags for the features used (DECSLRM and DECFRA).
Also rename the flag for no xenl to be more obvious while here.

Revision 1.336 / (download) - annotate - [select for diffs], Wed Dec 11 12:13:37 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.335: +5 -3 lines
Diff to previous 1.335 (colored)

Do not set cursor colour to default unless it has been changed, GitHub
issue 2013.

Revision 1.335 / (download) - annotate - [select for diffs], Thu Nov 28 09:56:25 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.334: +3 -2 lines
Diff to previous 1.334 (colored)

Long lines and spacing fixes.

Revision 1.334 / (download) - annotate - [select for diffs], Thu Nov 28 09:05:34 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.333: +18 -7 lines
Diff to previous 1.333 (colored)

Store xpixel/ypixel from TIOCGWINSZ and add formats.

Revision 1.333 / (download) - annotate - [select for diffs], Thu Nov 14 07:56:32 2019 UTC (4 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.332: +7 -3 lines
Diff to previous 1.332 (colored)

CUB and CUF are also limited by the margins so use CUP instead when
margins are enabled (we already do this for linefeed).

Revision 1.332 / (download) - annotate - [select for diffs], Thu Sep 19 08:56:37 2019 UTC (4 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.331: +2 -5 lines
Diff to previous 1.331 (colored)

Do not use bright when emulating 256 colours on an 8 colour terminal
because it is also bold on some terminals. GitHub issue 1914.

Revision 1.331 / (download) - annotate - [select for diffs], Mon Aug 5 06:42:02 2019 UTC (4 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.330: +41 -5 lines
Diff to previous 1.330 (colored)

Add support for the SD (scroll down) escape sequence, GitHub issue 1861.

Revision 1.330 / (download) - annotate - [select for diffs], Thu Aug 1 11:45:34 2019 UTC (4 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.329: +3 -1 lines
Diff to previous 1.329 (colored)

xterm 348 now disables margins when resized, so send DECLRMM again.

Revision 1.329 / (download) - annotate - [select for diffs], Tue Jul 16 14:11:52 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.328: +10 -5 lines
Diff to previous 1.328 (colored)

Fix check for wrapping when redrawing entire lines, GitHub issue 1836.

Revision 1.328 / (download) - annotate - [select for diffs], Thu Jun 27 15:17:41 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.327: +60 -6 lines
Diff to previous 1.327 (colored)

Add support for underscore colours with Setulc capability, mostly from
Kai Moschcau.

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

Fix some comments (top/bottom not left/right).

Revision 1.326 / (download) - annotate - [select for diffs], Thu Jun 20 11:59:59 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.325: +22 -26 lines
Diff to previous 1.325 (colored)

Add a per-pane option set. Pane options inherit from window options (so
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.

Revision 1.325 / (download) - annotate - [select for diffs], Thu May 30 07:42:41 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.324: +12 -1 lines
Diff to previous 1.324 (colored)

I had hoped that non-xenl terminals had died out, at least in fairly
modern OSs, but no - DragonFly BSD's console returns to haunt us. Fix it
at least somewhat. GitHub issue 1763.

Revision 1.324 / (download) - annotate - [select for diffs], Mon May 13 20:10:23 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.323: +3 -1 lines
Diff to previous 1.323 (colored)

Add support for overline (SGR 53), from Ricardo Banffy.

Revision 1.323 / (download) - annotate - [select for diffs], Thu Apr 25 19:03:43 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.322: +11 -3 lines
Diff to previous 1.322 (colored)

Need a fallback for -2 for aixterm colours.

Revision 1.322 / (download) - annotate - [select for diffs], Wed Apr 24 20:32:31 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.321: +2 -2 lines
Diff to previous 1.321 (colored)

Use bg not fg when adjusting for aixterm, from Ailin Nemui.

Revision 1.321 / (download) - annotate - [select for diffs], Wed Apr 24 20:29:24 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.320: +3 -5 lines
Diff to previous 1.320 (colored)

Use setaf/setab for aixterm colours, from Ailin Nemui.

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

Set the window size as well as the layout size when using the preset
layouts.

Revision 1.319 / (download) - annotate - [select for diffs], Thu Mar 14 17:58:52 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.318: +2 -2 lines
Diff to previous 1.318 (colored)

Fix ED1 (clear end of screen), reported by Marc Reisner.

Revision 1.318 / (download) - annotate - [select for diffs], Thu Mar 14 09:53:52 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.317: +19 -19 lines
Diff to previous 1.317 (colored)

Add a wrapper (struct style) around styles rather than using the
grid_cell directly. There will be some non-cell members soon.

Revision 1.317 / (download) - annotate - [select for diffs], Thu Mar 14 09:50:09 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.316: +20 -25 lines
Diff to previous 1.316 (colored)

Do not use const on struct window_pane, it causes more trouble than it
is worth.

Revision 1.316 / (download) - annotate - [select for diffs], Wed Mar 13 22:01:22 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.315: +3 -3 lines
Diff to previous 1.315 (colored)

Need to set attributes before clearing.

Revision 1.315 / (download) - annotate - [select for diffs], Tue Mar 12 23:21:45 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.314: +23 -19 lines
Diff to previous 1.314 (colored)

Set a flag on cells are genuinely empty (cleared and never written to)
and use tty_clear_line (which will choose the best escape sequence) to
clear any batches of cells with that flag when redrawing a line from the
stored screen.

Revision 1.314 / (download) - annotate - [select for diffs], Mon Mar 4 09:29:40 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.313: +4 -1 lines
Diff to previous 1.313 (colored)

Don't set client offset if client is not a terminal

Revision 1.313 / (download) - annotate - [select for diffs], Sun Jan 20 15:57:27 2019 UTC (5 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.312: +2 -2 lines
Diff to previous 1.312 (colored)

Should use DECFRA if not default, not if default. From Karl Beldan.

Revision 1.312 / (download) - annotate - [select for diffs], Tue Jan 15 12:08:53 2019 UTC (5 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.311: +2 -2 lines
Diff to previous 1.311 (colored)

Should save the bg colour when setting it to default, not the fg.

Revision 1.311 / (download) - annotate - [select for diffs], Mon Nov 19 13:35:41 2018 UTC (5 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.310: +5 -1 lines
Diff to previous 1.310 (colored)

evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547.

Revision 1.310 / (download) - annotate - [select for diffs], Thu Oct 25 15:13:38 2018 UTC (5 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.309: +22 -18 lines
Diff to previous 1.309 (colored)

Add a "terminal" colour which can be used instead of "default" in style
options for the terminal default colour, bypassing any inheritance from
other options. Prompted by a discussion with abieber@.

Revision 1.309 / (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.308: +416 -81 lines
Diff to previous 1.308 (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.308 / (download) - annotate - [select for diffs], Thu Oct 18 07:57:57 2018 UTC (5 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.307: +14 -3 lines
Diff to previous 1.307 (colored)

Support for extended underline styles on terminals which offer them,
enabled by adding the Smulx capability with terminal-overrides (add
something like ',vte*:Smulx=\E[4\:%p1%dm'). GitHub issue 1492.

Revision 1.307 / (download) - annotate - [select for diffs], Tue Sep 25 14:27:20 2018 UTC (5 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.306: +16 -6 lines
Diff to previous 1.306 (colored)

Allow panes to be 1 line or column by redrawing instead of using the
scroll region, from Soeren Tempel in GitHub issue 1487.

Revision 1.306 / (download) - annotate - [select for diffs], Tue Sep 11 17:31:01 2018 UTC (5 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.305: +7 -7 lines
Diff to previous 1.305 (colored)

The cursor position is limited to the margins for CUF and CUB, so turn
margins off for printing cells (like most everything else already
does). Problem reported by Thomas Sattler.

Revision 1.305 / (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.304: +3 -3 lines
Diff to previous 1.304 (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.304 / (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.303: +16 -1 lines
Diff to previous 1.303 (colored)

Some tidying and helper functions.

Revision 1.303 / (download) - annotate - [select for diffs], Wed Jul 4 09:44:07 2018 UTC (5 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.302: +7 -4 lines
Diff to previous 1.302 (colored)

Add accessors for grid linedata member, for some future work. From Dan
Aloni.

Revision 1.302 / (download) - annotate - [select for diffs], Mon May 7 13:39:09 2018 UTC (6 years ago) by nicm
Branch: MAIN
Changes since 1.301: +3 -5 lines
Diff to previous 1.301 (colored)

Handle terminfo colors > 256 correctly, GitHub issue 1337.

Revision 1.301 / (download) - annotate - [select for diffs], Mon Apr 23 07:41:30 2018 UTC (6 years ago) by nicm
Branch: MAIN
Changes since 1.300: +19 -9 lines
Diff to previous 1.300 (colored)

rxvt-unicode has some funny behaviour when scrolling with the cursor not
at column 1, so move it back there first if possible. GitHub issue 1318.

Revision 1.300 / (download) - annotate - [select for diffs], Sun Feb 4 10:10:39 2018 UTC (6 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.299: +10 -5 lines
Diff to previous 1.299 (colored)

Upstream ncurses has introduced terminfo capabilities to specify RGB
colour ("true" or "direct" colour). These consist of new entries (such
as "xterm-direct") which have a different setaf/setab implementation,
colors and pairs set to 0x1000000 and 0x10000, and a new RGB flag.

The setaf/setab definitions seem to be geared towards what ncurses (or
emacs maybe) needs, in that the new versions do only ANSI and RGB
colours (they can't be used for the 256 colour palette); they rely on
the silly ISO colon-separated version of SGR; and they use a weird
multiplication scheme so they still only need one argument. The higher
values of colors and pairs require a recent ncurses to parse.

tmux can use the RGB flag to detect RGB colour support (keeping the old
Tc extension for backwards compatibility for now). However, as we still
want to send 256 colour information unchanged when possible, the new
setaf/setab are awkward. So when RGB is present, reserve setaf/setab
only for ANSI colours and use the escape sequences directly for 256 and
RGB colours. (To my knowledge no recent terminal uses unusual escape
sequences for these in any case.)

Revision 1.299 / (download) - annotate - [select for diffs], Tue Jan 16 17:03:18 2018 UTC (6 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.298: +11 -5 lines
Diff to previous 1.298 (colored)

Fix drawing of ACS characters (they need to go character-at-a-time),
accidentally broken in last commit.

Revision 1.298 / (download) - annotate - [select for diffs], Fri Jan 12 16:41:00 2018 UTC (6 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.297: +47 -45 lines
Diff to previous 1.297 (colored)

Simplify character replacement on non-UTF-8 terminals and make a common
function.

Revision 1.297 / (download) - annotate - [select for diffs], Wed Nov 15 19:18:57 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.296: +17 -8 lines
Diff to previous 1.296 (colored)

If there is a double width character at the very end of the line with
not enough room to draw it, just leave it out.

Revision 1.296 / (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.295: +2 -2 lines
Diff to previous 1.295 (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.295 / (download) - annotate - [select for diffs], Thu Aug 24 08:48:37 2017 UTC (6 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.294: +3 -2 lines
Diff to previous 1.294 (colored)

When tty is error or closed, remove client. Reported by Thomas Sattler.

Revision 1.294 / (download) - annotate - [select for diffs], Mon Aug 21 21:02:58 2017 UTC (6 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.293: +2 -2 lines
Diff to previous 1.293 (colored)

Same as previous for \r alone.

Revision 1.293 / (download) - annotate - [select for diffs], Mon Aug 21 21:01:21 2017 UTC (6 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.292: +3 -2 lines
Diff to previous 1.292 (colored)

Do not emit \r\n to move to column 0 if there are margins, because it
will instead move to the margin left.

Revision 1.292 / (download) - annotate - [select for diffs], Fri Jul 21 22:55:45 2017 UTC (6 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.291: +12 -6 lines
Diff to previous 1.291 (colored)

Use the actual width written rather than the possible width to clear.

Revision 1.291 / (download) - annotate - [select for diffs], Fri Jul 21 14:25:29 2017 UTC (6 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.290: +13 -4 lines
Diff to previous 1.290 (colored)

Trim trailing spaces from full line when it is clearly OK to do so.

Revision 1.290 / (download) - annotate - [select for diffs], Tue Jun 6 14:53:28 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.289: +4 -2 lines
Diff to previous 1.289 (colored)

Delete input event when evbuffer_read() fails to avoid just spinning
around a dead file descriptor. Seems to fix a problem reported by Greg
Hurrell in GitHub issue 941.

Revision 1.289 / (download) - annotate - [select for diffs], Sun Jun 4 08:02:20 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.288: +2 -2 lines
Diff to previous 1.288 (colored)

Typo/style; plus man page escaping from jmc.

Revision 1.288 / (download) - annotate - [select for diffs], Sat Jun 3 07:15:23 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.287: +18 -9 lines
Diff to previous 1.287 (colored)

Foreground colours with the bright attribute set need to use the bright
entries in the palette. GitHub issue 954.

Revision 1.287 / (download) - annotate - [select for diffs], Wed May 31 10:29:15 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.286: +4 -10 lines
Diff to previous 1.286 (colored)

It is not OK to ignore SIGWINCH if SIOCGWINSZ reports the size has
unchanged, because it may have changed and changed back in the time
between us getting the signal and calling ioctl(). Always redraw when we
see SIGWINCH.

Revision 1.286 / (download) - annotate - [select for diffs], Wed May 31 08:43:44 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.285: +22 -10 lines
Diff to previous 1.285 (colored)

Look for setrgbf and setrgbb terminfo extensions for RGB colour. This is
the most reasonable of the various (some bizarre) suggestions for
capabilities.

Revision 1.285 / (download) - annotate - [select for diffs], Mon May 15 16:44:04 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.284: +12 -9 lines
Diff to previous 1.284 (colored)

Check the terminfo(5) U8 capability and disable using UTF-8 for ACS if
it is present and zero. This is useful for users with terminals or fonts
that do not correctly support UTF-8 line drawing characters. GitHub
issue 927, reported by Hiroaki Yamazoe and Akinori Hattori.

Revision 1.284 / (download) - annotate - [select for diffs], Mon May 15 07:54:44 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.283: +7 -16 lines
Diff to previous 1.283 (colored)

The Konsole SU bug means it can't clear the entire scroll region (it
ignores if >= size, not if > as I first thought). So we can't
effectively fix it in code - remove the workarounds which just cause
bugs on other terminals.

Revision 1.283 / (download) - annotate - [select for diffs], Sat May 13 07:41:59 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.282: +3 -3 lines
Diff to previous 1.282 (colored)

Scroll the right number of lines off the region when clearing.

Revision 1.282 / (download) - annotate - [select for diffs], Sat May 13 07:30:50 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.281: +2 -3 lines
Diff to previous 1.281 (colored)

Some other unused variables.

Revision 1.281 / (download) - annotate - [select for diffs], Fri May 12 23:10:19 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.280: +2 -2 lines
Diff to previous 1.280 (colored)

Compare >= for columns not >.

Revision 1.280 / (download) - annotate - [select for diffs], Fri May 12 23:06:43 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.279: +14 -1 lines
Diff to previous 1.279 (colored)

Can scroll away full lines to clear them too.

Revision 1.279 / (download) - annotate - [select for diffs], Fri May 12 14:13:54 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.278: +3 -1 lines
Diff to previous 1.278 (colored)

Cannot rely on cursor position after DL and IL (some terminals move to
column 0, some do not).

Revision 1.278 / (download) - annotate - [select for diffs], Fri May 12 13:00:56 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.277: +7 -5 lines
Diff to previous 1.277 (colored)

Scrolling needs to use background colour.

Revision 1.277 / (download) - annotate - [select for diffs], Fri May 12 11:19:24 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.276: +5 -2 lines
Diff to previous 1.276 (colored)

Regions can't be smaller than 2 so don't try to clear them by scrolling if so.

Revision 1.276 / (download) - annotate - [select for diffs], Fri May 12 11:13:43 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.275: +16 -3 lines
Diff to previous 1.275 (colored)

Can use INDN to clear regions with default background colour if margins
are supported.

Revision 1.275 / (download) - annotate - [select for diffs], Fri May 12 10:50:11 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.274: +2 -2 lines
Diff to previous 1.274 (colored)

ECH needs to use background colour.

Revision 1.274 / (download) - annotate - [select for diffs], Fri May 12 10:49:04 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.273: +13 -1 lines
Diff to previous 1.273 (colored)

Can use DECFRA to clear area when not using default background.

Revision 1.273 / (download) - annotate - [select for diffs], Thu May 11 11:38:49 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.272: +7 -3 lines
Diff to previous 1.272 (colored)

Need to redraw out to cellsize (total cells used in a line) rather than
cellused (only non-space cells) because there may be cells with a
nondefault background.

Revision 1.272 / (download) - annotate - [select for diffs], Wed May 10 18:40:13 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.271: +2 -1 lines
Diff to previous 1.271 (colored)

Move to the right cursor position before using spaces to clear.

Revision 1.271 / (download) - annotate - [select for diffs], Wed May 10 16:47:03 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.270: +117 -123 lines
Diff to previous 1.270 (colored)

We can use ECH to clear sections of lines, so use it for internal panes
(that don't touch an edge). Move all the tty clear code into two common
functions rather than having the same bunch of checks everywhere.

Revision 1.270 / (download) - annotate - [select for diffs], Tue May 9 13:04:36 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.269: +10 -3 lines
Diff to previous 1.269 (colored)

If the current screen was complex enough, it was possible to make redraw
itself hit the "terminal can't keep up" check. To avoid this, record how
much data we send during redraw (we know we will be starting with 0) and
skip the check until it has been flushed. GitHub issue 912.

Revision 1.269 / (download) - annotate - [select for diffs], Fri Apr 28 17:58:44 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.268: +14 -5 lines
Diff to previous 1.268 (colored)

Konsole incorrectly ignores SU (CSI S) if the parameter is bigger than
the scroll region, so clamp it. Reported by Moritz Bunkus.

Revision 1.268 / (download) - annotate - [select for diffs], Tue Apr 25 18:30:29 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.267: +30 -17 lines
Diff to previous 1.267 (colored)

Make full width panes try to play more nicely with terminal copy and
paste by avoiding explicit line wraps if we think the terminal will wrap
anyway.

Revision 1.267 / (download) - annotate - [select for diffs], Sun Apr 23 18:13:24 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.266: +2 -1 lines
Diff to previous 1.266 (colored)

Only use ED for clear screen if at the bottom, same as earlier fix to
clear end of screen.

Revision 1.266 / (download) - annotate - [select for diffs], Wed Apr 19 06:52:27 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.265: +65 -3 lines
Diff to previous 1.265 (colored)

When the data we have buffered to write to a terminal grows beyond a
reasonable amount (currently width * height * 8 bytes), discard all
output to the terminal and start trying to redraw periodically
instead. Continue with this until the amount of data we are trying to
write falls to a low level again.

This helps to prevent tmux sitting on a huge buffer of data when there
are processes with fast output running inside tmux but the outside
terminal is slow.

A new client_discarded format holds the amount of data that has been
discarded due to this mechanism.

The three variables (when to start this, when to stop, and how often to
redraw) are basically "works for me" at the moment, this is going in to
see how it goes and if it causes problems for anyone else.

Revision 1.265 / (download) - annotate - [select for diffs], Tue Apr 18 21:41:42 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.264: +3 -3 lines
Diff to previous 1.264 (colored)

Revert use of DECSLRM on iTerm2, it doesn't help as much as we throught,
and there are some question marks about it's support.

Revision 1.264 / (download) - annotate - [select for diffs], Tue Apr 18 18:21:37 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.263: +4 -4 lines
Diff to previous 1.263 (colored)

Detect iTerm2 and use DECSLRM for it as well.

Revision 1.263 / (download) - annotate - [select for diffs], Tue Apr 18 15:44:17 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.262: +2 -1 lines
Diff to previous 1.262 (colored)

Add a format for number of bytes writtent to client, useful for debugging.

Revision 1.262 / (download) - annotate - [select for diffs], Tue Apr 18 15:27:47 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.261: +5 -5 lines
Diff to previous 1.261 (colored)

Do not check for BCE for a background colour that isn't needed, use
colour 8 instead.

Revision 1.261 / (download) - annotate - [select for diffs], Mon Apr 17 08:10:44 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.260: +3 -3 lines
Diff to previous 1.260 (colored)

Don't bother moving the cursor for empty lines.

Revision 1.260 / (download) - annotate - [select for diffs], Mon Apr 17 06:40:32 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.259: +2 -4 lines
Diff to previous 1.259 (colored)

Remove a couple of redraw flags that no longer have any effect.

Revision 1.259 / (download) - annotate - [select for diffs], Sun Apr 16 20:32:14 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.258: +14 -3 lines
Diff to previous 1.258 (colored)

Use EL1 to clear lines when redrawing the leftmost pane, rather than
spaces.

Revision 1.258 / (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.257: +14 -13 lines
Diff to previous 1.257 (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.257 / (download) - annotate - [select for diffs], Wed Apr 5 10:45:20 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.256: +14 -9 lines
Diff to previous 1.256 (colored)

Change tty_repeat_space to write large sets of spaces together instead
of writing them individually.

Revision 1.256 / (download) - annotate - [select for diffs], Fri Mar 24 14:45:00 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.255: +2 -6 lines
Diff to previous 1.255 (colored)

Write raw strings in one go rather than character at a time.

Revision 1.255 / (download) - annotate - [select for diffs], Wed Mar 22 07:16:54 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.254: +4 -2 lines
Diff to previous 1.254 (colored)

Add support for the strikethrough attribute (SGR 9), using the new smxx
terminfo capability. This means there are now nine attribute bits, so
anything above 0xff uses an extended cell.

Revision 1.254 / (download) - annotate - [select for diffs], Wed Mar 15 15:22:14 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.253: +7 -3 lines
Diff to previous 1.253 (colored)

Invalidate the cursor when we think we should have wrapped.

Revision 1.253 / (download) - annotate - [select for diffs], Wed Mar 15 09:21:21 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.252: +23 -3 lines
Diff to previous 1.252 (colored)

Try to avoid moving the cursor to the start of the next line when
printing cells if it is already at the very end of the line and the
terminal will wrap it to the next line itself, this means terminals
still see it as a wrapped line for the purposes of their own mouse
selection. Reported by millert@.

Revision 1.252 / (download) - annotate - [select for diffs], Wed Mar 8 14:34:35 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.251: +2 -8 lines
Diff to previous 1.251 (colored)

Always send smkx to the terminal outside, the keys we get from terminfo
are the keys when it is on.

Revision 1.251 / (download) - annotate - [select for diffs], Mon Mar 6 09:02:59 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.250: +18 -5 lines
Diff to previous 1.250 (colored)

Collect strings correctly when on terminals that don't support UTF-8.

Revision 1.250 / (download) - annotate - [select for diffs], Tue Feb 21 16:25:04 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.249: +44 -24 lines
Diff to previous 1.249 (colored)

Change pane redraw to collect cells up as well, and simplify it a bit.

Revision 1.249 / (download) - annotate - [select for diffs], Thu Feb 16 12:56:01 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.248: +3 -3 lines
Diff to previous 1.248 (colored)

There are buggy terminals out there that do not move the cursor to 0,0
after CSR, so invalidate the cursor position rather than assuming 0,0.

Revision 1.248 / (download) - annotate - [select for diffs], Wed Feb 15 11:22:13 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.247: +2 -1 lines
Diff to previous 1.247 (colored)

Do not clear to end of screen unless the pane is at the bottom.

Revision 1.247 / (download) - annotate - [select for diffs], Fri Feb 10 15:39:43 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.246: +3 -3 lines
Diff to previous 1.246 (colored)

Add not delete the event if more to write.

Revision 1.246 / (download) - annotate - [select for diffs], Fri Feb 10 15:39:14 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.245: +5 -56 lines
Diff to previous 1.245 (colored)

Revert; committed from the wrong directory.

Revision 1.245 / (download) - annotate - [select for diffs], Fri Feb 10 15:38:23 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.244: +57 -6 lines
Diff to previous 1.244 (colored)

Add rather than delete the event if more writing to come.

Revision 1.244 / (download) - annotate - [select for diffs], Fri Feb 10 12:59:18 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.243: +68 -55 lines
Diff to previous 1.243 (colored)

Don't use a bufferevent for the tty, so we can keep better track of what
is being written and when.

Also a manpage typo fix from jmc@.

Revision 1.243 / (download) - annotate - [select for diffs], Wed Feb 8 23:53:03 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.242: +20 -34 lines
Diff to previous 1.242 (colored)

Another helper function to write to terminal and log.

Revision 1.242 / (download) - annotate - [select for diffs], Wed Feb 8 23:47:35 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.241: +31 -39 lines
Diff to previous 1.241 (colored)

Add a common function to invalidate all the terminal cached state.

Revision 1.241 / (download) - annotate - [select for diffs], Wed Feb 8 22:42:07 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.240: +2 -2 lines
Diff to previous 1.240 (colored)

Do not adjust region lower by pane offset when scrolling up, it is
already an absolute position.

Revision 1.240 / (download) - annotate - [select for diffs], Wed Feb 8 17:31:09 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.239: +27 -1 lines
Diff to previous 1.239 (colored)

Add support for scroll up escape sequence (CSI S) and use it when
possible instead of sending individual line feeds.

Revision 1.239 / (download) - annotate - [select for diffs], Wed Feb 8 16:45:18 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.238: +10 -1 lines
Diff to previous 1.238 (colored)

Collect sequences of printable ASCII characters and process them
together instead of handling them one by one. This is significantly
faster. Sequences are terminated when we reach the end of the line, fill
the internal buffer, or a different character is seen by the input
parser (an escape sequence, or UTF-8).

Rather than writing collected sequences out immediately, hold them until
it is necessary (another screen modification, or we consume all
available data). This means we can discard changes that would have no
effect (for example, lines that would just be scrolled off the screen or
cleared). This reduces the total amount of data we write out to the
terminal - not important for fast terminals, but a big help with slow
(like xterm).

Revision 1.238 / (download) - annotate - [select for diffs], Wed Feb 8 16:18:20 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.237: +6 -5 lines
Diff to previous 1.237 (colored)

Fix clear start of line.

Revision 1.237 / (download) - annotate - [select for diffs], Wed Feb 8 15:49:29 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.236: +2 -4 lines
Diff to previous 1.236 (colored)

Some other tidying bits.

Revision 1.236 / (download) - annotate - [select for diffs], Wed Feb 8 15:24:48 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.235: +2 -5 lines
Diff to previous 1.235 (colored)

Remove unnecessary duplicate check.

Revision 1.235 / (download) - annotate - [select for diffs], Wed Feb 8 13:53:32 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.234: +2 -1 lines
Diff to previous 1.234 (colored)

Improve some of the logging on resize.

Revision 1.234 / (download) - annotate - [select for diffs], Wed Feb 8 08:54:45 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.233: +12 -6 lines
Diff to previous 1.233 (colored)

Log size of output buffer as well.

Revision 1.233 / (download) - annotate - [select for diffs], Wed Feb 8 08:50:10 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.232: +2 -39 lines
Diff to previous 1.232 (colored)

Trying to avoid the occasional newline by saving the last cell on screen
is not actually helping us much and just adds complexity, so don't
bother.

Revision 1.232 / (download) - annotate - [select for diffs], Tue Feb 7 18:27:46 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.231: +6 -4 lines
Diff to previous 1.231 (colored)

Do not clear the scroll region, instead set it to the scroll region we
actually want.

Revision 1.231 / (download) - annotate - [select for diffs], Tue Feb 7 17:13:28 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.230: +19 -7 lines
Diff to previous 1.230 (colored)

DECSLRM in xterm(1) appears to have a quirk where it can generate an
extra scroll of the entire terminal; issuing DECSTBM first prevents
this. Do that for now.

Revision 1.230 / (download) - annotate - [select for diffs], Tue Feb 7 14:33:37 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.229: +7 -48 lines
Diff to previous 1.229 (colored)

Unfortunately DECFRA does not handle default colours properly (it does
not reset colours when in SGR 0), so we can't use it without more
trouble than it is worth. Abandon the idea for now.

Revision 1.229 / (download) - annotate - [select for diffs], Mon Feb 6 22:05:11 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.228: +82 -23 lines
Diff to previous 1.228 (colored)

Use DECFRA on VT420 compatible terminals (so, xterm) and ED on all
others for clearing panes.

Revision 1.228 / (download) - annotate - [select for diffs], Mon Feb 6 19:45:23 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.227: +24 -7 lines
Diff to previous 1.227 (colored)

Do not go through the whole attributes setting process if the new cell
is the same as the previous one.

Revision 1.227 / (download) - annotate - [select for diffs], Mon Feb 6 19:26:49 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.226: +2 -2 lines
Diff to previous 1.226 (colored)

Add BCE for clear to start of screen, which was somehow missed.

Revision 1.226 / (download) - annotate - [select for diffs], Mon Feb 6 13:23:00 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.225: +1 -13 lines
Diff to previous 1.225 (colored)

Only redraw the modified character when adding combining characters, not
the whole line.

Revision 1.225 / (download) - annotate - [select for diffs], Wed Feb 1 09:55:07 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.224: +7 -3 lines
Diff to previous 1.224 (colored)

Implement "all event" (1003) mouse mode but in a way that works. The
main issue is that if we have two panes, A with 1002 and B with 1003, we
need to set 1003 outside tmux in order to get all the mouse events, but
then we need to suppress the ones that pane A doesn't want. This is easy
in SGR mouse mode, because buttons == 3 is only used for movement events
(for other events the trailing m/M marks a release instead), but in
normal mouse mode we can't tell so easily. So for that, look at the
previous event instead - if it is drag+release as well, then the current
event is a movement event.

Revision 1.224 / (download) - annotate - [select for diffs], Thu Jan 12 00:30:41 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.223: +15 -7 lines
Diff to previous 1.223 (colored)

aixterm colours can be used if -2 is given, as well as if TERM tells us
the terminal has >=16 colours.

Revision 1.223 / (download) - annotate - [select for diffs], Thu Jan 12 00:19:32 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.222: +14 -9 lines
Diff to previous 1.222 (colored)

Fix setting the palette of aixterm colours (90-97).

Revision 1.222 / (download) - annotate - [select for diffs], Wed Jan 11 23:10:04 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.221: +7 -8 lines
Diff to previous 1.221 (colored)

Be less aggressive about turning margins off.

Revision 1.221 / (download) - annotate - [select for diffs], Wed Jan 11 22:36:07 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.220: +2 -4 lines
Diff to previous 1.220 (colored)

Add some missing special keys to key_string_lookup_key, fix a mouse
check in server_client_handle_key, and tweak a comment.

Revision 1.220 / (download) - annotate - [select for diffs], Wed Jan 11 16:09:57 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.219: +5 -5 lines
Diff to previous 1.219 (colored)

Add a format for terminal type.

Revision 1.219 / (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.218: +29 -9 lines
Diff to previous 1.218 (colored)

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

Revision 1.218 / (download) - annotate - [select for diffs], Wed Dec 7 09:16:55 2016 UTC (7 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.217: +3 -2 lines
Diff to previous 1.217 (colored)

Only skip moving the cursor if it is already in the last position _on
the same line_, fixes redraw bug reported by patrick keshishian.

Revision 1.217 / (download) - annotate - [select for diffs], Wed Nov 30 13:20:02 2016 UTC (7 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.216: +2 -2 lines
Diff to previous 1.216 (colored)

Fix check for cursor at end of line.

Revision 1.216 / (download) - annotate - [select for diffs], Mon Nov 28 17:50:00 2016 UTC (7 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.215: +6 -7 lines
Diff to previous 1.215 (colored)

When comparing ocy to orlower in tty_cmd_cell, there is no need to add
yoff (because they are both already relative to the pane). Also fix some
other minor nits.

Revision 1.215 / (download) - annotate - [select for diffs], Wed Nov 16 13:31:22 2016 UTC (7 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.214: +7 -3 lines
Diff to previous 1.214 (colored)

Fix calculation of whether we need a region for drawing a cell (only if
full width and at the edge of the region), otherwise clear the region entirely.

Revision 1.214 / (download) - annotate - [select for diffs], Tue Nov 15 15:17:28 2016 UTC (7 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.213: +35 -15 lines
Diff to previous 1.213 (colored)

Turn on margins, with a couple of fixes (only limit to the pane for line
feeds, and do not move cursor to end for full width panes).

Revision 1.213 / (download) - annotate - [select for diffs], Tue Nov 15 14:08:27 2016 UTC (7 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.212: +2 -2 lines
Diff to previous 1.212 (colored)

And of course I just find a bug, disable previous for now.

Revision 1.212 / (download) - annotate - [select for diffs], Tue Nov 15 14:02:32 2016 UTC (7 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.211: +79 -12 lines
Diff to previous 1.211 (colored)

Initial attempt to make use of left and right margins if the terminal
supports them (that is, if it advertises itself as a VT420 - probably
just xterm). These are the vertical equivalent of the scroll region and
allow much faster scrolling of panes that do not take up the full width
of the terminal.

Revision 1.211 / (download) - annotate - [select for diffs], Fri Oct 14 21:48:00 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.210: +13 -9 lines
Diff to previous 1.210 (colored)

Don't make assumptions about line wrap on !xenl terminals, means that
using a wrong TERM without xenl is not so broken if used on a sensible
terminal.

Revision 1.210 / (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.209: +64 -33 lines
Diff to previous 1.209 (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.209 / (download) - annotate - [select for diffs], Wed Oct 12 13:24:07 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.208: +7 -3 lines
Diff to previous 1.208 (colored)

Redraw selection in tty_draw_line, so it appears when redrawing whole
pane. Reported by Theo Buehler.

Revision 1.208 / (download) - annotate - [select for diffs], Tue Oct 11 13:21:59 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.207: +12 -5 lines
Diff to previous 1.207 (colored)

Add static in window-*.c and move some internal functions out of tmux.h.

Revision 1.207 / (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.206: +38 -37 lines
Diff to previous 1.206 (colored)

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

Revision 1.206 / (download) - annotate - [select for diffs], Mon Oct 3 19:19:18 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.205: +6 -10 lines
Diff to previous 1.205 (colored)

Remove some redundant checks and make ich/dch consistent.

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

Don't update cells in each block of data read from a pane immediately,
instead track them as change (dirty) and update them once at the end,
saves much time if repeatedly writing the same cell. Also fix comparison
of cells being equal in a few places (memcmp is not enough).

Revision 1.204 / (download) - annotate - [select for diffs], Fri Jul 15 00:42:56 2016 UTC (7 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.203: +92 -218 lines
Diff to previous 1.203 (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.203 / (download) - annotate - [select for diffs], Mon May 30 09:50:21 2016 UTC (7 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.202: +24 -15 lines
Diff to previous 1.202 (colored)

Cache the window styles and do not look up the window-style options
unless they have changed.

Revision 1.202 / (download) - annotate - [select for diffs], Mon May 30 09:26:49 2016 UTC (7 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.201: +7 -2 lines
Diff to previous 1.201 (colored)

Send two cub1 instead of using cub for moving the cursor two left. This
is normally better because using cub1 will be ^H^H (so two bytes) but
cub would be ^[[2D (four).

Revision 1.201 / (download) - annotate - [select for diffs], Sat Apr 30 18:59:02 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.200: +4 -2 lines
Diff to previous 1.200 (colored)

tty_client_ready can not be internal to tty.c again.

Revision 1.200 / (download) - annotate - [select for diffs], Thu Mar 3 12:58:15 2016 UTC (8 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.199: +5 -1 lines
Diff to previous 1.199 (colored)

RGB colours shouldn't be mixed up with aixterm colours, return before
that happens when working out if they are supported.

Revision 1.199 / (download) - annotate - [select for diffs], Fri Jan 29 11:13:56 2016 UTC (8 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.198: +155 -32 lines
Diff to previous 1.198 (colored)

Support for RGB colour, using the extended cell mechanism to avoid
wasting unnecessary space. The 'Tc' flag must be set in the external
TERM entry (using terminal-overrides or a custom terminfo entry), if not
tmux will map to the closest of the 256 or 16 colour palettes.

Mostly from Suraj N Kurapati, based on a diff originally by someone else.

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

I no longer use my SourceForge address so replace it.

Revision 1.197 / (download) - annotate - [select for diffs], Mon Dec 28 14:02:52 2015 UTC (8 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.196: +2 -2 lines
Diff to previous 1.196 (colored)

Couple of trivial style nits.

Revision 1.196 / (download) - annotate - [select for diffs], Fri Dec 11 16:37:21 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.195: +7 -7 lines
Diff to previous 1.195 (colored)

Style nits and line wrapping of function declarations.

Revision 1.195 / (download) - annotate - [select for diffs], Mon Nov 23 20:53:09 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.194: +2 -11 lines
Diff to previous 1.194 (colored)

Remove support for the UTF-8 mouse extension. This was a briefly used,
poor idea that was fairly quickly replaced by SGR mouse input (which is
now widespread). It is impossible to tell the difference between UTF-8
and non-UTF-8 mouse input; since the mouse-utf8 option was removed tmux
has not handled it correctly in any case; and it is ridiculous to have
three different forms of mouse input.

Revision 1.194 / (download) - annotate - [select for diffs], Wed Nov 18 14:27:44 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.193: +5 -5 lines
Diff to previous 1.193 (colored)

Use __unused rather than rolling our own.

Revision 1.193 / (download) - annotate - [select for diffs], Fri Nov 13 08:09:28 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.192: +15 -24 lines
Diff to previous 1.192 (colored)

Long overdue change to the way we store cells in the grid: now, instead
of storing a full grid_cell with UTF-8 data and everything, store a new
type grid_cell_entry. This can either be the cell itself (for ASCII
cells), or an offset into an extended array (per line) for UTF-8
data.

This avoid a large (8 byte) overhead on non-UTF-8 cells (by far the
majority for most users) without the complexity of the shadow array we
had before. Grid memory without any UTF-8 is about half.

The disadvantage that cells can no longer be modified in place and need
to be copied out of the grid and back but it turned out to be lot less
complicated than I expected.

Revision 1.192 / (download) - annotate - [select for diffs], Sat Oct 31 13:12:03 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.191: +21 -24 lines
Diff to previous 1.191 (colored)

The output log is only useful once and it means creating a file, so open
it once at startup instead of in every call to tty_open.

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

Move struct options into options.c.

Revision 1.190 / (download) - annotate - [select for diffs], Fri Oct 23 16:30:15 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.189: +3 -5 lines
Diff to previous 1.189 (colored)

Remove some unnecessary checks before free().

Revision 1.189 / (download) - annotate - [select for diffs], Fri Oct 23 15:52:54 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.188: +10 -10 lines
Diff to previous 1.188 (colored)

Use tty_term_flag not _has for XT, and make -2 force direct use of
256-colour escape sequences (so setaf/setab can be bypassed if needed).

Revision 1.188 / (download) - annotate - [select for diffs], Fri Sep 25 23:30:12 2015 UTC (8 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.187: +17 -10 lines
Diff to previous 1.187 (colored)

If the terminal has colors=256, only try to use setaf/setab if they
exist, reported by Filipe Brandenburger.

Revision 1.187 / (download) - annotate - [select for diffs], Wed Sep 2 17:43:25 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.186: +1 -7 lines
Diff to previous 1.186 (colored)

A one line helper function is a little silly.

Revision 1.186 / (download) - annotate - [select for diffs], Wed Sep 2 17:37:54 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.185: +1 -10 lines
Diff to previous 1.185 (colored)

We no longer need the terminal service class, so don't bother asking for it.

Revision 1.185 / (download) - annotate - [select for diffs], Mon Jul 13 15:51:31 2015 UTC (8 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.184: +8 -8 lines
Diff to previous 1.184 (colored)

Fix line endings.

Revision 1.184 / (download) - annotate - [select for diffs], Mon Jul 13 15:49:31 2015 UTC (8 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.183: +8 -3 lines
Diff to previous 1.183 (colored)

Initialize cwd fd to -1 so that we don't close fd 0 if the client is
destroyed before it is changed. Also allow ttyname() to fail. Fixes
problems when running out of file descriptors reported by Bruno Sutic.

Revision 1.183 / (download) - annotate - [select for diffs], Tue May 19 08:48:37 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.182: +12 -9 lines
Diff to previous 1.182 (colored)

In terminfo, sometimes cvvis implies cnorm and sometimes it doesn't, so
don't assume it does. Fixes missing cursor with emacs-in-tmux-in-tmux.

Revision 1.182 / (download) - annotate - [select for diffs], Tue May 12 22:40:38 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.181: +18 -10 lines
Diff to previous 1.181 (colored)

To replace c0-*, add a high watermark to the pty event, and also backoff
when the any of the ttys the pane is going to write to has buffered
enough data.

Revision 1.181 / (download) - annotate - [select for diffs], Wed May 6 07:52:06 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.180: +19 -14 lines
Diff to previous 1.180 (colored)

Turn cursor off during redraw, pointed out by George Nachman.

Revision 1.180 / (download) - annotate - [select for diffs], Wed Apr 29 15:59:08 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.179: +19 -7 lines
Diff to previous 1.179 (colored)

If default-terminal is set to "screen" or "screen-*", emulate screen's
historical (incorrect) behaviour for SGR 3 and send smso
(standout). Previously, we would send sitm (italics) if the terminal
outside had it and smso otherwise. This was acceptably until recently
because xterm's terminfo entry lacked sitm, so most users got smso.

People who want italics should set default-terminal to the forthcoming
"tmux" entry (and be prepared to deal with it being missing on older
hosts).

As a side-effect this changes default-terminal to be a server rather
than a session option.

suggested by and ok naddy

Revision 1.179 / (download) - annotate - [select for diffs], Sat Apr 25 15:57:48 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.178: +3 -3 lines
Diff to previous 1.178 (colored)

Explicitly cancel mouse "button" mode, this happens implicitly with some
one of the other things we send with xterm, but not with urxvt. Reported
by sthen@.

Revision 1.178 / (download) - annotate - [select for diffs], Fri Apr 24 23:17:11 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.177: +3 -5 lines
Diff to previous 1.177 (colored)

Convert clients list into a TAILQ.

Revision 1.177 / (download) - annotate - [select for diffs], Sun Apr 19 21:34:21 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.176: +5 -1 lines
Diff to previous 1.176 (colored)

Rewrite of tmux mouse support which was a mess. Instead of having
options for "mouse-this" and "mouse-that", mouse events may be bound as
keys and there is one option "mouse" that turns on mouse support
entirely (set -g mouse on).

See the new MOUSE SUPPORT section of the man page for description of the
key names and new flags (-t= to specify the pane or window under mouse
as a target, and send-keys -M to pass through a mouse event).

The default builtin bindings for the mouse are:

    bind -n   MouseDown1Pane select-pane -t=; send-keys -M
    bind -n MouseDown1Status select-window -t=
    bind -n   MouseDrag1Pane copy-mode -M
    bind -n MouseDrag1Border resize-pane -M

To get the effect of turning mode-mouse off, do:

    unbind -n MouseDrag1Pane
    unbind -temacs-copy MouseDrag1Pane

The old mouse options are now gone, set-option -q may be used to
suppress warnings if mixing configuration files.

Revision 1.176 / (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.175: +125 -47 lines
Diff to previous 1.175 (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.175 / (download) - annotate - [select for diffs], Wed Apr 15 22:34:46 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.174: +17 -17 lines
Diff to previous 1.174 (colored)

Fix some issues in bright colour handling. Bold background doesn't exist
so there is no reason for tty_check_bg to mess with the BRIGHT flag at
all, ever. Also use aixterm colours for 256-to-16 translation if the
terminal supports them. And there is no reason for tty_colours_bg to
worry about whether the terminal supports them - tty_check_bg has
already taken care of it.

Revision 1.174 / (download) - annotate - [select for diffs], Wed Apr 15 22:10:13 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.173: +3 -3 lines
Diff to previous 1.173 (colored)

Use tty_term_flag not _has for flags, also fix a typo (position not
permission).

Revision 1.173 / (download) - annotate - [select for diffs], Thu Feb 5 11:46:57 2015 UTC (9 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.172: +3 -1 lines
Diff to previous 1.172 (colored)

Reset bracket paste mode on detach.

Revision 1.172 / (download) - annotate - [select for diffs], Fri Jan 30 12:33:03 2015 UTC (9 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.171: +2 -2 lines
Diff to previous 1.171 (colored)

Focus off needs to be sent with tty_raw, reported by Geoff Nixon.

Revision 1.171 / (download) - annotate - [select for diffs], Tue Jan 20 08:18:04 2015 UTC (9 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.170: +9 -5 lines
Diff to previous 1.170 (colored)

Support blinking cursor mode, both the xterm CSI ?12 h/l and (the
backwards) screen CSI 34 h/l. From Guanpeng Xu.

Revision 1.170 / (download) - annotate - [select for diffs], Sat Aug 9 07:33:37 2014 UTC (9 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.169: +3 -7 lines
Diff to previous 1.169 (colored)

Remove support for the continuous reporting "any" mouse mode which never
really worked properly and is rarely used.

Revision 1.169 / (download) - annotate - [select for diffs], Fri Apr 25 12:45:16 2014 UTC (10 years ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.168: +2 -2 lines
Diff to previous 1.168 (colored)

specifying ECHOCTL once is enough
ok nicm@

Revision 1.168 / (download) - annotate - [select for diffs], Thu Apr 17 14:45:49 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.167: +3 -3 lines
Diff to previous 1.167 (colored)

Some more long lines.

Revision 1.167 / (download) - annotate - [select for diffs], Thu Apr 17 12:57:28 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.166: +3 -2 lines
Diff to previous 1.166 (colored)

Wrap some long lines.

Revision 1.166 / (download) - annotate - [select for diffs], Sun Feb 23 00:53:06 2014 UTC (10 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.165: +3 -3 lines
Diff to previous 1.165 (colored)

Change terminal-overrides to a server option (now that we have them), it
doesn't make much sense as a session option.

Revision 1.165 / (download) - annotate - [select for diffs], Fri Feb 14 14:37:08 2014 UTC (10 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.164: +23 -7 lines
Diff to previous 1.164 (colored)

If the terminfo entry has colors#256, assume that setaf and setab work
and use them for the 256 colour set. If the terminfo entry doesn't have
colors#256 and the user gives -2 to the client, use a \033[38;5;Xm
sequence as before. Should allow fbterm to work with it's weird setaf
and setab.

Revision 1.164 / (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.163: +2 -3 lines
Diff to previous 1.163 (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.163 / (download) - annotate - [select for diffs], Sun Oct 20 09:37:50 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.162: +2 -3 lines
Diff to previous 1.162 (colored)

Don't turn on modifyOtherKeys by default, it is annoying if tmux is
killed and it's left on and we can't turn it on and off like we do for
attributes. It's not hard to enable in .Xresources or .Xdefaults anyway.

Revision 1.162 / (download) - annotate - [select for diffs], Sun Jun 23 13:10:48 2013 UTC (10 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.161: +13 -3 lines
Diff to previous 1.161 (colored)

Focus events can cause trouble if left on and they can't be turned off
during idle periods (like the other states are) because we'd miss
events. So add a server option to control them. Defaults to off.

Revision 1.161 / (download) - annotate - [select for diffs], Tue Jun 11 19:18:02 2013 UTC (10 years, 11 months ago) by sthen
Branch: MAIN
Changes since 1.160: +3 -3 lines
Diff to previous 1.160 (colored)

revert r1.156 "Add support for focus notifications when tmux pane changes"
beck@ found annoying beeps if a machine was shutdown while tmux is running
and you then focus in/out of an xterm; kettenis tracked it down to 1.156.

Revision 1.160 / (download) - annotate - [select for diffs], Sun Jun 2 07:52:15 2013 UTC (10 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.159: +10 -10 lines
Diff to previous 1.159 (colored)

The actual terminfo entries we ended up with for cursor changes are Cs,
Ce, Ss and Se (not Cc, Ce, Cs, Csr). So use and document these instead
of the ones we were using earlier.

Revision 1.159 / (download) - annotate - [select for diffs], Thu Apr 11 07:27:27 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.158: +3 -3 lines
Diff to previous 1.158 (colored)

Send an SGR0 after turning on modifyOtherKeys to fix Terminal.app which
treats \033[>4;1m and \033[4;1m (bold+underline). Reported & tested by
otto@.

Revision 1.158 / (download) - annotate - [select for diffs], Wed Mar 27 11:17:12 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.157: +5 -29 lines
Diff to previous 1.157 (colored)

Remove tmux's (already minimal) 88 colour support. Such terminals are
few and unnecessary.

Revision 1.157 / (download) - annotate - [select for diffs], Sun Mar 24 09:29:00 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.156: +3 -3 lines
Diff to previous 1.156 (colored)

Handle focus events from the terminal, from Aaron Jensen.

Revision 1.156 / (download) - annotate - [select for diffs], Sun Mar 24 09:18:16 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.155: +2 -2 lines
Diff to previous 1.155 (colored)

Add support for focus notifications when tmux pane changes, based on
work by Aaron Jensen.

Revision 1.155 / (download) - annotate - [select for diffs], Fri Mar 22 10:40:22 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.154: +2 -2 lines
Diff to previous 1.154 (colored)

Use tty_raw on stop, not tty_puts.

Revision 1.154 / (download) - annotate - [select for diffs], Fri Mar 22 10:34:46 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.153: +4 -2 lines
Diff to previous 1.153 (colored)

Correctly handle UTF8 mouse option being toggled, from Egmont Koblinger.

Revision 1.153 / (download) - annotate - [select for diffs], Fri Mar 22 10:33:50 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.152: +14 -3 lines
Diff to previous 1.152 (colored)

Support the latest theory for mouse input, this is enabled/disabled with
SM/RM 1006 and is similar in style to SGR input: \033[<b;x;yM or
\033[b;x;ym. From Egmont Koblinger.

Revision 1.152 / (download) - annotate - [select for diffs], Fri Mar 22 10:31:22 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.151: +1 -3 lines
Diff to previous 1.151 (colored)

No more lint means no more ARGSUSED.

Revision 1.151 / (download) - annotate - [select for diffs], Fri Mar 22 10:30:04 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.150: +5 -2 lines
Diff to previous 1.150 (colored)

In terminals with XT, turn on modifyOtherKeys=1 with the escape sequence
and handle the most common set. Pass them through if xterm-keys is on.

Revision 1.150 / (download) - annotate - [select for diffs], Fri Mar 22 10:29:31 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.149: +18 -4 lines
Diff to previous 1.149 (colored)

I strongly suspect it is possible for tmux to block on detach in
tty_raw, so make the fd blocking again much later and have tty_raw just
retry the write a few times.

Revision 1.149 / (download) - annotate - [select for diffs], Thu Mar 21 18:44:47 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.148: +2 -2 lines
Diff to previous 1.148 (colored)

Include the \033 in the key tree and adjust key matching for this change.

Revision 1.148 / (download) - annotate - [select for diffs], Thu Mar 21 16:50:22 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.147: +2 -2 lines
Diff to previous 1.147 (colored)

Tidy by splitting default key tables into two.

Revision 1.147 / (download) - annotate - [select for diffs], Fri Jan 18 02:16:21 2013 UTC (11 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.146: +27 -43 lines
Diff to previous 1.146 (colored)

Rather than having two grids for each pane, one for ASCII and one for
UTF-8, collapse the two together. Simplifies the code at the expense of
more memory (which can probably be reduced again later).

Revision 1.146 / (download) - annotate - [select for diffs], Tue Jan 15 23:18:55 2013 UTC (11 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.145: +18 -1 lines
Diff to previous 1.145 (colored)

Implement ECH (erase character, CSI X). Reported by Christian Neukirchen.

Revision 1.145 / (download) - annotate - [select for diffs], Thu Nov 22 14:41:11 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.144: +9 -1 lines
Diff to previous 1.144 (colored)

Put helper function back, will be needed in a bit.

Revision 1.144 / (download) - annotate - [select for diffs], Thu Nov 22 14:26:04 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.143: +2 -10 lines
Diff to previous 1.143 (colored)

Instead of worrying about xterm version, send DA and read DEC service
class which is more likely to be useful. Not used for anything yet
anyway.

Revision 1.143 / (download) - annotate - [select for diffs], Thu Nov 22 14:10:53 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.142: +1 -4 lines
Diff to previous 1.142 (colored)

Don't need to send DECSL on detaching now, the code using higher levels
has gone.

Revision 1.142 / (download) - annotate - [select for diffs], Sat Sep 29 06:57:56 2012 UTC (11 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.141: +4 -2 lines
Diff to previous 1.141 (colored)

Do not test client flags against TTY_FREEZE bit, reported by Tom Ryder.

Revision 1.141 / (download) - annotate - [select for diffs], Wed Sep 5 09:59:41 2012 UTC (11 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.140: +7 -1 lines
Diff to previous 1.140 (colored)

We can't tell what the terminal has done with a DCS string, so reset the
cursor and attributes afterwards.

Revision 1.140 / (download) - annotate - [select for diffs], Mon Sep 3 15:47:40 2012 UTC (11 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.139: +2 -59 lines
Diff to previous 1.139 (colored)

Remove xterm CRA support - support is patchy and it will be done better
using margins.

Revision 1.139 / (download) - annotate - [select for diffs], Tue Aug 14 08:58:25 2012 UTC (11 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.138: +10 -17 lines
Diff to previous 1.138 (colored)

Tidy up tty_write, from Sean Estabrooks.

Revision 1.138 / (download) - annotate - [select for diffs], Tue Jul 10 11:53:01 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.137: +6 -6 lines
Diff to previous 1.137 (colored)

xfree is not particularly helpful, remove it. From Thomas Adam.

Revision 1.137 / (download) - annotate - [select for diffs], Wed Jun 20 12:55:55 2012 UTC (11 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.136: +1 -3 lines
Diff to previous 1.136 (colored)

Remove a couple of unused variables from redbrain at gcc dot gnu dot org.

Revision 1.136 / (download) - annotate - [select for diffs], Tue May 22 14:32:28 2012 UTC (11 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.135: +3 -2 lines
Diff to previous 1.135 (colored)

Store client in tty struct directly instead of using a callback function
pointer.

Revision 1.135 / (download) - annotate - [select for diffs], Tue May 22 09:37:54 2012 UTC (12 years ago) by nicm
Branch: MAIN
Changes since 1.134: +3 -5 lines
Diff to previous 1.134 (colored)

Use tty_pane_full_width macro in some more places.

Revision 1.134 / (download) - annotate - [select for diffs], Tue May 22 09:36:12 2012 UTC (12 years ago) by nicm
Branch: MAIN
Changes since 1.133: +2 -7 lines
Diff to previous 1.133 (colored)

If there are any terminals with insert mode but not ich1, they can go
through the slow path. Tidies code slightly.

Revision 1.133 / (download) - annotate - [select for diffs], Tue May 22 09:09:16 2012 UTC (12 years ago) by nicm
Branch: MAIN
Changes since 1.132: +23 -33 lines
Diff to previous 1.132 (colored)

Move some common code to repeat spaces into a function.

Revision 1.132 / (download) - annotate - [select for diffs], Sat May 5 18:45:55 2012 UTC (12 years ago) by nicm
Branch: MAIN
Changes since 1.131: +13 -24 lines
Diff to previous 1.131 (colored)

Tidy up by adding a macro for the pane being the full screen width, from
Ailin Nemui.

Revision 1.131 / (download) - annotate - [select for diffs], Sat May 5 18:31:09 2012 UTC (12 years ago) by nicm
Branch: MAIN
Changes since 1.130: +3 -3 lines
Diff to previous 1.130 (colored)

Missing ()s in macros.

Revision 1.130 / (download) - annotate - [select for diffs], Sat May 5 18:17:59 2012 UTC (12 years ago) by nicm
Branch: MAIN
Changes since 1.129: +43 -12 lines
Diff to previous 1.129 (colored)

Pull CRA out into a separate function and add ERA, from Ailin Nemui.

Revision 1.129 / (download) - annotate - [select for diffs], Tue Mar 20 11:01:00 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.128: +2 -2 lines
Diff to previous 1.128 (colored)

Add a simple form of output rate limiting by counting the number of
certain C0 sequences (linefeeds, backspaces, carriage returns) and if it
exceeds a threshold (current default 50/millisecond), start to redraw
the pane every 100 milliseconds instead of making each change as it
comes. Two configuration options - c0-change-trigger and
c0-change-interval.

This makes tmux much more responsive under very fast output (for example
yes(1) or accidentally cat'ing a large file) but may not be perfect on
all terminals and connections - feedback very welcome, particularly
where this change has a negative rather than positive effect (making it
off by default is a possibility).

After much experimentation based originally on a request Robin Lee
Powell (which ended with a completely different solution), this idea
from discussion with Ailin Nemui.

Revision 1.128 / (download) - annotate - [select for diffs], Sat Mar 17 22:56:04 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.127: +42 -3 lines
Diff to previous 1.127 (colored)

On xterm 271 and later, put the terminal into SCL 5 and use DECCRA for
scrolling the region in panes (if the large region check isn't
hit). With help from Ailin Nemui.

Revision 1.127 / (download) - annotate - [select for diffs], Sat Mar 17 21:27:51 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.126: +15 -8 lines
Diff to previous 1.126 (colored)

Break out termios initialization into a separate function, from George
Nachman.

Revision 1.126 / (download) - annotate - [select for diffs], Sat Mar 17 19:29:46 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.125: +2 -2 lines
Diff to previous 1.125 (colored)

Do not clear to end of line if the line is full, fixes missing last
character in rightmost pane.

Revision 1.125 / (download) - annotate - [select for diffs], Sat Mar 17 19:18:37 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.124: +2 -2 lines
Diff to previous 1.124 (colored)

Use the region lower not the pane size to work out where the bottom line
is.

Revision 1.124 / (download) - annotate - [select for diffs], Sat Mar 17 18:51:50 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.123: +2 -2 lines
Diff to previous 1.123 (colored)

Tweak last fix to actually hit the right end of pane.

Revision 1.123 / (download) - annotate - [select for diffs], Sat Mar 17 18:24:07 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.122: +3 -2 lines
Diff to previous 1.122 (colored)

Check event_initialized before event_del if event may not have been set
up; libevent2 complains about this. Reported by Moriyoshi Koizumi.

Revision 1.122 / (download) - annotate - [select for diffs], Sat Mar 17 17:36:03 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.121: +5 -2 lines
Diff to previous 1.121 (colored)

Revert screen-write.c r1.54 and fix the bug properly. After wrapping a
line in a pane, the cursor needs to move to the next line unless it
scrolled.

Revision 1.121 / (download) - annotate - [select for diffs], Thu Mar 15 10:36:00 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.120: +4 -1 lines
Diff to previous 1.120 (colored)

Send secondary DA to terminals with XT in terminfo when starting up and
parse it to work out the xterm version.

Revision 1.120 / (download) - annotate - [select for diffs], Thu Mar 15 09:22:31 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.119: +2 -1 lines
Diff to previous 1.119 (colored)

Fix a warning. Doh.

Revision 1.119 / (download) - annotate - [select for diffs], Thu Mar 15 09:10:33 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.118: +17 -6 lines
Diff to previous 1.118 (colored)

Add a helper function for enabling an optimization to make some code
clearer.

Revision 1.118 / (download) - annotate - [select for diffs], Mon Mar 12 12:43:18 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.117: +2 -2 lines
Diff to previous 1.117 (colored)

Erm, use EL in a way that actually works...

Revision 1.117 / (download) - annotate - [select for diffs], Mon Mar 12 12:38:42 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.116: +3 -2 lines
Diff to previous 1.116 (colored)

Use EL to clear to end of line if possible.

Revision 1.116 / (download) - annotate - [select for diffs], Fri Mar 9 21:42:13 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.115: +2 -2 lines
Diff to previous 1.115 (colored)

Remove some bits leftover from unused backoff code.

Revision 1.115 / (download) - annotate - [select for diffs], Sat Mar 3 09:43:23 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.114: +7 -1 lines
Diff to previous 1.114 (colored)

Support "bracketed paste" mode. This adds a -p flag to paste-buffer - if
this is used and the application has requested bracketed pastes, then
tmux surrounds the pasted text by \033[200~ and \033[201~. Applications
like vim can (apparently) use this to avoid, for example, indenting the
text. From Ailin Nemui.

Revision 1.114 / (download) - annotate - [select for diffs], Wed Feb 15 17:25:02 2012 UTC (12 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.113: +11 -4 lines
Diff to previous 1.113 (colored)

Add a wrapper function tty_set_size from George Nachman.

Revision 1.113 / (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.112: +36 -31 lines
Diff to previous 1.112 (colored)

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

Revision 1.112 / (download) - annotate - [select for diffs], Sat Jan 21 08:23:12 2012 UTC (12 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.111: +5 -5 lines
Diff to previous 1.111 (colored)

Add strings to allow the aixterm bright colours to be used when
configuring colours, requested by Elliott Cable a few months ago.

Revision 1.111 / (download) - annotate - [select for diffs], Sun Jan 15 19:39:42 2012 UTC (12 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.110: +5 -2 lines
Diff to previous 1.110 (colored)

Calculate last position correctly for UTF-8 wide characters, reported by
Matthias Lederhofer.

Revision 1.110 / (download) - annotate - [select for diffs], Wed Aug 24 09:58:44 2011 UTC (12 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.109: +7 -1 lines
Diff to previous 1.109 (colored)

Add a tty_bell wrapper function, from Dylan Alex Simon.

Revision 1.109 / (download) - annotate - [select for diffs], Thu May 26 07:08:48 2011 UTC (12 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.108: +2 -2 lines
Diff to previous 1.108 (colored)

Trim another useless if statement, from Ailin Nemui.

Revision 1.108 / (download) - annotate - [select for diffs], Fri May 20 19:17:39 2011 UTC (13 years ago) by nicm
Branch: MAIN
Changes since 1.107: +18 -1 lines
Diff to previous 1.107 (colored)

Support DECSCUSR sequence to set the cursor style with two new
terminfo(5) extensions, Cs and Csr. Written by Ailin Nemui.

Revision 1.107 / (download) - annotate - [select for diffs], Fri May 20 19:03:58 2011 UTC (13 years ago) by nicm
Branch: MAIN
Changes since 1.106: +31 -5 lines
Diff to previous 1.106 (colored)

Support xterm(1) cursor colour change sequences through terminfo(5) Cc
(set) and Cr (reset) extensions. Originally by Sean Estabrooks, tweaked
by me and Ailin Nemui.

Revision 1.106 / (download) - annotate - [select for diffs], Wed May 18 20:24:29 2011 UTC (13 years ago) by nicm
Branch: MAIN
Changes since 1.105: +29 -1 lines
Diff to previous 1.105 (colored)

Support setting the xterm clipboard when copying from copy mode using
the xterm escape sequence for the purpose (if xterm is configured to
allow it).

Written by and much discussed Ailin Nemui, guidance on
xterm/termcap/terminfo from Thomas Dickey.

Revision 1.105 / (download) - annotate - [select for diffs], Sun May 8 19:53:08 2011 UTC (13 years ago) by nicm
Branch: MAIN
Changes since 1.104: +5 -6 lines
Diff to previous 1.104 (colored)

Use the tsl and fsl terminfo(5) capabilities to update terminal title
and automatically fill them in on terminals with the XT capability
(which means their title setting is xterm-compatible). From hsim at
gmx.li.

Revision 1.104 / (download) - annotate - [select for diffs], Sat Apr 9 07:48:08 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.103: +7 -2 lines
Diff to previous 1.103 (colored)

If the terminal supports sitm for italics, use it instead of standout
(smso). From Tiago Resende.

Revision 1.103 / (download) - annotate - [select for diffs], Sun Mar 27 20:36:19 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.102: +3 -3 lines
Diff to previous 1.102 (colored)

Set the terminal blocking again earlier, before sending the reset
sequences.

Revision 1.102 / (download) - annotate - [select for diffs], Sat Mar 26 19:07:33 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.101: +12 -4 lines
Diff to previous 1.101 (colored)

Fix to properly wrap wide characters, from Micah Cowan.

Revision 1.101 / (download) - annotate - [select for diffs], Tue Mar 8 19:23:49 2011 UTC (13 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.100: +2 -2 lines
Diff to previous 1.100 (colored)

Fix an incorrect test which was always true (oupper is always < olower),
from Yusuke ENDOH.

Revision 1.100 / (download) - annotate - [select for diffs], Mon Mar 7 23:46:27 2011 UTC (13 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.99: +11 -1 lines
Diff to previous 1.99 (colored)

Support passing through escape sequences to the underlying terminal by
using DCS with a "tmux;" prefix. Escape characters in the sequences must
be doubled. For example:

$ printf '\033Ptmux;\033\033]12;red\007\033\\'

Will pass \033]12;red\007 to the terminal (and change the cursor colour
in xterm). From Kevin Goodsell.

Revision 1.99 / (download) - annotate - [select for diffs], Sat Jan 29 08:39:43 2011 UTC (13 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.98: +4 -7 lines
Diff to previous 1.98 (colored)

Accept tcgetattr/tcsetattr failure, fixes problems with fatal() if the
terminal disappears while locked.

Revision 1.98 / (download) - annotate - [select for diffs], Sat Jan 15 00:46:19 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.97: +9 -9 lines
Diff to previous 1.97 (colored)

Only set a mouse mode for mouse-select-pane if none already set by the
mode (any will do).

Revision 1.97 / (download) - annotate - [select for diffs], Sat Jan 15 00:16:00 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.96: +1 -5 lines
Diff to previous 1.96 (colored)

Mouse highlight mode (1001) requires a program to cooperate so
supporting it through tmux is not as easy as this, remove it for now.

Revision 1.96 / (download) - annotate - [select for diffs], Sat Jan 8 01:52:37 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.95: +3 -9 lines
Diff to previous 1.95 (colored)

Move all calls to fcntl(...O_NONBLOCK) into a function and clear the
flag on the stdio file descriptors before closing them (fixes things
like "tmux ls && cat").

Revision 1.95 / (download) - annotate - [select for diffs], Mon Jan 3 23:35:22 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.94: +5 -1 lines
Diff to previous 1.94 (colored)

Support for UTF-8 mouse input (\033[1005h). This was added in xterm 262
and supports larger terminals than the older way.

If the new mouse-utf8 option is on, UTF-8 mouse input is enabled for all
UTF-8 terminals. The option defaults to on if LANG etc are set in the
same manner as the utf8 option.

With help and based on code from hsim at gmx.li.

Revision 1.94 / (download) - annotate - [select for diffs], Wed Dec 29 21:49:06 2010 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.93: +17 -9 lines
Diff to previous 1.93 (colored)

Support all four of the xterm mouse modes. Based on a diff from hsim at
gmx.li.

Revision 1.93 / (download) - annotate - [select for diffs], Mon Nov 22 21:13:13 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.92: +2 -2 lines
Diff to previous 1.92 (colored)

There is somewhere that WINDOW_HIDDEN is getting set when it shouldn't
be and I can't find it, but the flag itself is a useless optimisation
that only applies to automatic-resize windows, so just dispose of it
entirely.

Fixes problems reported by Nicholas Riley.

Revision 1.92 / (download) - annotate - [select for diffs], Sat Oct 16 08:31:55 2010 UTC (13 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.91: +1 -4 lines
Diff to previous 1.91 (colored)

Trying to set FD_CLOEXEC on every fd is a lost cause, just use
closefrom() before exec.

Revision 1.91 / (download) - annotate - [select for diffs], Sat Sep 11 16:20:58 2010 UTC (13 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.90: +2 -2 lines
Diff to previous 1.90 (colored)

Ugh. Pass the right type into tty_term_has. Teaches me to make last
minute changes :-/.

Revision 1.90 / (download) - annotate - [select for diffs], Sat Sep 11 16:19:22 2010 UTC (13 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.89: +20 -37 lines
Diff to previous 1.89 (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.89 / (download) - annotate - [select for diffs], Wed Aug 11 07:34:43 2010 UTC (13 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.88: +4 -2 lines
Diff to previous 1.88 (colored)

Change the way backoff works. Instead of stopping reading from the pty
when the client tty backs up too much, just stop updating the tty and
only update the internal screen. Then when the tty recovers, force a
redraw.

This prevents a dodgy client from causing other clients to go into
backoff while still allowing tmux to be responsive (locally) when seeing
lots of output.

Revision 1.88 / (download) - annotate - [select for diffs], Sat Jun 5 16:47:11 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.87: +30 -9 lines
Diff to previous 1.87 (colored)

Fix problems with window sizing seen by Raghavendra D Prabhu when
starting tmux from .xinitrc.

One of the very few things the server relies on the client for now is to
pass through a message on SIGWINCH, but there is a condition where
potentially a SIGWINCH may be lost during the transition from unattached
(main.c) to attached (client.c). So trigger a size change immediately
after the client installs its SIGWINCH handler.

Also, when the terminal is resized, reset the scroll region and cursor
position. Previously, we were clearing our saved idea of these, but in
fact some terminals do not reset them on resize, so this caused problems
during redraw.

While here make a resize to the same size not cause a redraw and rename
the tmux.out output log file to include the tmux PID.

Revision 1.87 / (download) - annotate - [select for diffs], Sat Jun 5 16:32:22 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.86: +3 -3 lines
Diff to previous 1.86 (colored)

Shut up gcc4 warnings.

Revision 1.86 / (download) - annotate - [select for diffs], Mon May 31 19:51:29 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.85: +13 -6 lines
Diff to previous 1.85 (colored)

When the mode-mouse option is on, support dragging to make a selection
in copy mode.

Also support the scroll wheel, although xterm strangely does not ignore
it in application mouse mode, causing redraw artifacts when scrolling up
(other terminals appear to be better behaved).

Revision 1.85 / (download) - annotate - [select for diffs], Mon Mar 1 22:44:31 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.84: +92 -53 lines
Diff to previous 1.84 (colored)

Check for colour and attribute modifications early so the translated
values can be stored in the cached terminal attributes rather than the
requested (untranslated) values. Prevents tmux clearing and setting the
attributes for every character when using aixterm colours.

Revision 1.84 / (download) - annotate - [select for diffs], Wed Feb 24 19:08:39 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.83: +4 -5 lines
Diff to previous 1.83 (colored)

Don't set the terminal to nonblocking on detach until we have finished with it
entirely.

Revision 1.83 / (download) - annotate - [select for diffs], Mon Feb 1 23:06:24 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.82: +2 -2 lines
Diff to previous 1.82 (colored)

If redrawing line 0 of the screen onto the tty, there can't be a wrap flag on
the previous line, so move the cursor. Fixes status line redraw issues when
resizing in choose mode and hopefully at other times as well.

Revision 1.82 / (download) - annotate - [select for diffs], Fri Jan 1 14:29:18 2010 UTC (14 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.81: +3 -6 lines
Diff to previous 1.81 (colored)

Use tcflush(3) instead of TIOCFLUSH, from Ed Schouten.

Revision 1.81 / (download) - annotate - [select for diffs], Sat Dec 26 11:02:32 2009 UTC (14 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.80: +7 -5 lines
Diff to previous 1.80 (colored)

Fix the logic so that transition from a 256 colour to default works properly.

Revision 1.80 / (download) - annotate - [select for diffs], Sat Dec 26 10:39:02 2009 UTC (14 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.79: +1 -2 lines
Diff to previous 1.79 (colored)

Nuke some stray debugging.

Revision 1.79 / (download) - annotate - [select for diffs], Mon Dec 14 21:33:38 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.78: +28 -1 lines
Diff to previous 1.78 (colored)

Pass through the aixterm bright colours if the terminal supports them (>= 16
colours).

Revision 1.78 / (download) - annotate - [select for diffs], Fri Dec 4 11:01:29 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.77: +2 -4 lines
Diff to previous 1.77 (colored)

vte is buggy and doesn't home the cursor after changing the scroll
region. Several people are hitting this, so add a workaround.

Revision 1.77 / (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.76: +41 -41 lines
Diff to previous 1.76 (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.76 / (download) - annotate - [select for diffs], Wed Dec 2 22:13:15 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.75: +8 -2 lines
Diff to previous 1.75 (colored)

Reflect the keypad mode of the application so that numlock works.

Revision 1.75 / (download) - annotate - [select for diffs], Fri Nov 27 09:41:03 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.74: +2 -1 lines
Diff to previous 1.74 (colored)

Add a couple of comments.

Revision 1.74 / (download) - annotate - [select for diffs], Thu Nov 26 22:47:14 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.73: +6 -7 lines
Diff to previous 1.73 (colored)

Fix type - attributes should be u_char not int.

Revision 1.73 / (download) - annotate - [select for diffs], Thu Nov 26 21:37:13 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.72: +6 -4 lines
Diff to previous 1.72 (colored)

Remove a couple of unused arguments where possible, and add /* ARGSUSED */ to
the rest to reduce lint output.

Revision 1.72 / (download) - annotate - [select for diffs], Thu Nov 26 14:46:08 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.71: +9 -5 lines
Diff to previous 1.71 (colored)

Emulate il1, dl1, ich1 to run (albeit slowly) with vt100 feature set.

Revision 1.71 / (download) - annotate - [select for diffs], Wed Nov 18 17:02:17 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.70: +6 -10 lines
Diff to previous 1.70 (colored)

Cleanup by moving various (mostly horrible) little bits handling UTF-8 grid
data into functions in a new file, grid-utf8.c, and use sizeof intead of
UTF8_DATA.

Also nuke trailing whitespace from tmux.1, reminded by jmc.

Revision 1.70 / (download) - annotate - [select for diffs], Thu Nov 12 08:05:23 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.69: +3 -2 lines
Diff to previous 1.69 (colored)

Emulate the ri (reverse index) capability: this allows tmux to at least start
on Sun consoles (TERM=sun or sun-color), even if there appear to still be
problems on some boxes (my Blade 100 is fine but edd's Blade 1000 shows odd
screen corruption).

Revision 1.69 / (download) - annotate - [select for diffs], Mon Nov 9 22:50:29 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.68: +1 -2 lines
Diff to previous 1.68 (colored)

Just ignore tty fd errors rather than dying, stops the server dying if the
session is disconnected abrubtly (eg ssh ~.).

Revision 1.68 / (download) - annotate - [select for diffs], Thu Nov 5 22:35:28 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.67: +2 -2 lines
Diff to previous 1.67 (colored)

Clear to the end of the screen from the right starting point when drawing
line-by-line (in panes or if ed not supported). Fixes problem spotted by Frank
Terbeck.

Revision 1.67 / (download) - annotate - [select for diffs], Thu Nov 5 08:45:08 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.66: +13 -2 lines
Diff to previous 1.66 (colored)

Switch tty key input over to happen on a read event. This is a bit more
complicated because of escape input, but in that case instead of processing a
key immediately, schedule a timer and reprocess the bufer when it expires.

This currently assumes that keys will be atomic (ie that if eg F1 is pressed
the entire sequence is present in the buffer). This is usually but not always
true, a change in the tree format so it can differentiate potential (partial)
key sequences will happens soon and will allow this to be fixed.

Revision 1.66 / (download) - annotate - [select for diffs], Wed Nov 4 21:47:42 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.65: +22 -10 lines
Diff to previous 1.65 (colored)

Switch tty fds over to a bufferevent.

Revision 1.65 / (download) - annotate - [select for diffs], Wed Nov 4 15:59:27 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.64: +1 -5 lines
Diff to previous 1.64 (colored)

Ignore the colour on space, /not/ the attributes.

Revision 1.64 / (download) - annotate - [select for diffs], Wed Nov 4 13:34:26 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.63: +25 -19 lines
Diff to previous 1.63 (colored)

Fix the reverse emulation when a terminal doesn't have setab to use the correct
fg/bg (adjusted if spaces) and happen before attribute setting.

Revision 1.63 / (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.62: +17 -3 lines
Diff to previous 1.62 (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.62 / (download) - annotate - [select for diffs], Wed Oct 28 08:33:20 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.61: +10 -11 lines
Diff to previous 1.61 (colored)

Twaek this slightly to avoid confusing use of flags variable.

Revision 1.61 / (download) - annotate - [select for diffs], Wed Oct 28 08:27:33 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.60: +146 -89 lines
Diff to previous 1.60 (colored)

Setting SGR0 when setting the fg and bg has problems if only one of the two is
meant to be default, so rewrite the code to move this outside, move setting
colours before attributes and generally clean up.

Tested by sthen@, fixes problems he was seeing with mutt and should fix some
existing problems with (rarely) lost attributes.

Revision 1.60 / (download) - annotate - [select for diffs], Mon Oct 26 21:42:04 2009 UTC (14 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored)

tabs are better; ok nicm

Revision 1.59 / (download) - annotate - [select for diffs], Sun Oct 25 21:11:21 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.58: +24 -15 lines
Diff to previous 1.58 (colored)

Remove the -d flag to tmux and just use op/AX to detect default colours.

Irritatingly, although op can be used to tell if a terminal supports default
colours, it can't be used to set them because in some terminfo descriptions it
resets attributes as a side-effect (acts as sgr0) and in others it doesn't, so
it is not possible to determine reliably what the terminal state will be
afterwards. So if AX is missing and op is present, tmux just sends sgr0.

Anyone using -d for a terminal who finds they actually needed it can replace it
using terminal-overrides, but please let me know as it is probably an omission
from terminfo.

Revision 1.58 / (download) - annotate - [select for diffs], Wed Oct 21 19:27:09 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored)

Unused variable.

Revision 1.57 / (download) - annotate - [select for diffs], Wed Oct 21 16:52:30 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.56: +16 -9 lines
Diff to previous 1.56 (colored)

Now we are correctly not redrawing the whole pane on linefeed, redo the
last-cursor-position code to move to the right position when panes reach EOL.

Revision 1.56 / (download) - annotate - [select for diffs], Wed Oct 21 13:42:44 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.55: +19 -17 lines
Diff to previous 1.55 (colored)

Don't redraw the scroll region on linefeed/reverse index unless it is necessary
(the cursor is at the bottom/top). Should fix slow cursor movement when using
vi in a pane spotted by pirofti@.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Oct 21 09:36:53 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.54: +10 -1 lines
Diff to previous 1.54 (colored)

Some terminals don't correctly clear their let's-wrap flag after changing the
scroll region (which moves the cursor to 0,0). This means that if the cursor
was at the edge of the screen, any further output after scroll region change
incorrectly causes a line wrap. Add a workaround to move the cursor to position
0 if it is at the screen edge before changing scroll region.

Revision 1.54 / (download) - annotate - [select for diffs], Tue Oct 20 19:18:28 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.53: +3 -4 lines
Diff to previous 1.53 (colored)

Try to reduce the UTF-8 mess.

Get rid of passing around u_char[4]s and define a struct utf8_data which has
character data, size (sequence length) and width. Move UTF-8 character
collection into two functions utf8_open/utf8_append in utf8.c which fill in
this struct and use these functions from input.c and the various functions in
screen-write.c.

Space for rather more data than is necessary for one UTF-8 sequence is in the
utf8_data struct because screen_write_copy is still nasty and needs to reinject
the character (after combining) into screen_write_cell.

Revision 1.53 / (download) - annotate - [select for diffs], Tue Oct 20 17:33:33 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.52: +7 -8 lines
Diff to previous 1.52 (colored)

UTF-8 combined character fixes.

Thai can have treble combinations (1 x width=1 then 2 x width=0) so bump the
UTF-8 cell data size to 9 and alter the code to allow this.

Also break off the combining code into a separate function, handle any further
combining beyond the buffer size by replacing the character with _s, and when
redrawing the UTF-8 character don't assume the first part has just been
printed, redraw the entire line.

Revision 1.52 / (download) - annotate - [select for diffs], Tue Oct 20 16:32:23 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.51: +9 -1 lines
Diff to previous 1.51 (colored)

Move the check for whether to force a line wrapper lower down into the tty code
where it has access to the tty width, which is what should have been checked.

Revision 1.51 / (download) - annotate - [select for diffs], Sat Oct 17 08:35:38 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.50: +3 -2 lines
Diff to previous 1.50 (colored)

Always move the cursor position on !xenl terminals, since there is no invisible
last cursor position.

Also nuke an unused variable.

Revision 1.50 / (download) - annotate - [select for diffs], Sat Oct 17 08:24:46 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.49: +12 -24 lines
Diff to previous 1.49 (colored)

Instead of having a complicated check to see if the cursor is in the last
position to avoid an explicit wrap, actually move it there.

Some UTF-8 fixes to come.

Revision 1.49 / (download) - annotate - [select for diffs], Fri Oct 16 19:09:40 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.48: +3 -3 lines
Diff to previous 1.48 (colored)

When checking whether the region will scroll and the cursor position is thus
unsuitable for using CUD/CUU, check the current cursor position not the target
position.

Revision 1.48 / (download) - annotate - [select for diffs], Tue Oct 13 08:37:15 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)

Don't try to use \n across scroll region when doing \r\n either.

Revision 1.47 / (download) - annotate - [select for diffs], Tue Oct 13 00:44:16 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.46: +4 -3 lines
Diff to previous 1.46 (colored)

Instead of using something sort of similar for both newline checks, use
something the same. Doesn't fix the bug I'm looking for though :-/.

Revision 1.46 / (download) - annotate - [select for diffs], Mon Oct 12 17:19:47 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.45: +47 -6 lines
Diff to previous 1.45 (colored)

When drawing lines that have wrapped naturally, don't force a newline but
permit them to wrap naturally again. This allows terminals that use this to
guess where lines start and end for eg mouse selecting (like xterm) to work
correctly.

This was another long-standing issue raised by several people over the last
while.

Thanks to martynas@ for much testing. This was not trivial to get right so
bringing it in for wider testing and adn to fix any further glitches in-tree.

Revision 1.45 / (download) - annotate - [select for diffs], Mon Oct 12 16:41:02 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.44: +10 -5 lines
Diff to previous 1.44 (colored)

Don't run through the column unchanged case if the row was unchanged but there
were no suitable optimisations, instead make it an else to fall through to
absolute addressing.

Revision 1.44 / (download) - annotate - [select for diffs], Mon Oct 12 16:37:43 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.43: +8 -7 lines
Diff to previous 1.43 (colored)

If the vertical cursor movement crosses the scroll region, CUU and CUD
shouldn't be used even if VPA isn't present - in that case CUP should be used.

Revision 1.43 / (download) - annotate - [select for diffs], Mon Oct 12 14:54:19 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.42: +6 -3 lines
Diff to previous 1.42 (colored)

Use absolute movement if right at the end of the line as it isn't a reliable
place to move from relatively.

Revision 1.42 / (download) - annotate - [select for diffs], Mon Oct 12 13:01:18 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.41: +115 -8 lines
Diff to previous 1.41 (colored)

Use relative cursor movement instead of absolute when possible and when
supported by the terminal to reduce the size of the output data (generally
about 10-20%).

Revision 1.41 / (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.40: +38 -28 lines
Diff to previous 1.40 (colored)

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

Revision 1.40 / (download) - annotate - [select for diffs], Mon Oct 12 09:16:59 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.39: +5 -3 lines
Diff to previous 1.39 (colored)

_absolute is redundant, just use tty_region.

Revision 1.39 / (download) - annotate - [select for diffs], Mon Oct 12 09:09:35 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.38: +36 -17 lines
Diff to previous 1.38 (colored)

Cleanup: use two functions for region setting, one for absolute and one inside
pane.

Revision 1.38 / (download) - annotate - [select for diffs], Sun Oct 11 22:35:10 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.37: +7 -8 lines
Diff to previous 1.37 (colored)

Like linefeed, don't set the scroll region for reverse index unless it will be
needed.

While here, also tidy up a couple of long lines and remove an extraneous blank.

Revision 1.37 / (download) - annotate - [select for diffs], Sat Oct 10 10:36:46 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.36: +3 -4 lines
Diff to previous 1.36 (colored)

There is no point setting the scroll region up for line feeds unless scrolling
is actually going to happen, so don't.

Revision 1.36 / (download) - annotate - [select for diffs], Fri Oct 9 07:33:12 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.35: +1 -82 lines
Diff to previous 1.35 (colored)

The UTF-8 detection idea doesn't work and I am reasonably happy with the
current methods, so remove the (already #ifdef 0'd) code.

Revision 1.35 / (download) - annotate - [select for diffs], Fri Oct 9 07:23:28 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.34: +7 -3 lines
Diff to previous 1.34 (colored)

Be less aggressive about turning the cursor off, only explicitly turn it off
when tmux is redrawing, otherwise leave in the state set by the application.

Revision 1.34 / (download) - annotate - [select for diffs], Wed Sep 23 12:03:31 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.33: +12 -7 lines
Diff to previous 1.33 (colored)

Support -c like sh(1) to execute a command, useful when tmux is a login
shell. Suggested by halex@.

This includes another protocol version increase (the last for now) so again
restart the tmux server before upgrading.

Revision 1.33 / (download) - annotate - [select for diffs], Wed Sep 23 07:25:31 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.32: +4 -1 lines
Diff to previous 1.32 (colored)

Don't die if the client is detaching (the tty has been closed) after waking up
from locking.

Revision 1.32 / (download) - annotate - [select for diffs], Wed Sep 23 06:18:48 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.31: +1 -3 lines
Diff to previous 1.31 (colored)

Remove the internal tmux locking and instead detach each client and run the
command specified by a new option "lock-command" (by default "lock -np") in
each client.

This means each terminal has to be unlocked individually but simplifies the
code and allows the system password to be used to unlock.

Note that the set-password command is gone, so it will need to be removed from
configuration files, and the -U command line flag has been removed.

This is the third protocol version change so again it is best to stop the tmux
server before upgrading.

Revision 1.31 / (download) - annotate - [select for diffs], Wed Sep 23 06:12:58 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.30: +22 -1 lines
Diff to previous 1.30 (colored)

Trim some code by moving the ioctl(TIOCGWINSZ) after SIGWINCH from the client
into the server.

This is another (the second of four) protocol version changes coming this
morning, so again the server should be killed before upgrading.

Revision 1.30 / (download) - annotate - [select for diffs], Wed Sep 23 06:05:02 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.29: +25 -23 lines
Diff to previous 1.29 (colored)

Don't attempt to open() the tty path, rely on the client sending its stdin fd
with imsg and fatal if it doesn't, then set the FD_CLOEXEC flag in tty_init
instead of tty_open to prevent them leaking into child processes if any are
created between the two calls.

This bumps the protocol version, so the tmux server should be killed before
upgrading.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Sep 22 19:11:52 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

Be more careful about what flags are cleared when opening the terminal,
otherwise the opened/started flags are cleared and the terminal never released.

Revision 1.28 / (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.27: +3 -2 lines
Diff to previous 1.27 (colored)

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

Revision 1.27 / (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.26: +1 -2 lines
Diff to previous 1.26 (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.26 / (download) - annotate - [select for diffs], Fri Aug 21 12:29:59 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.25: +7 -3 lines
Diff to previous 1.25 (colored)

Emulate dch/dch1 if missing by redrawing the entire line.

Revision 1.25 / (download) - annotate - [select for diffs], Fri Aug 14 08:53:52 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.24: +4 -3 lines
Diff to previous 1.24 (colored)

Send SGR0 when initialising the screen. Fixes problems on terminals with BCE
(like putty) if the background colours is non-default when tmux starts. May
also fix problems when resuming a suspended tmux.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Aug 12 09:41:59 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.23: +22 -20 lines
Diff to previous 1.23 (colored)

A tty context must not be modified as it may be reused to update multiple
clients, so make it const.

Also fix an actual modification which caused a hang when a session was
connected to multiple terminals at least one of which was missing ich/ich1.

Revision 1.23 / (download) - annotate - [select for diffs], Tue Aug 11 22:34:17 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.22: +2 -1 lines
Diff to previous 1.22 (colored)

Initialise log_fd to -1, prevents spurious disconnection of the client when it
ends up as fd 0 (likely if the server is started with "tmux start").

Also add some extra debugging messages to server.c.

Revision 1.22 / (download) - annotate - [select for diffs], Tue Aug 11 21:28:11 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.21: +10 -6 lines
Diff to previous 1.21 (colored)

Have the client pass its stdin fd to the server when identifying itself and
have the server use that rather than reopening the tty. If the fd isn't given,
use the old behaviour (so no need for a version change).

This allows tmux to be used as the shell, so also change so that when working
out the command to execute if default-command is empty (the default), tmux will
try not execute itself.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Aug 11 20:29:05 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.20: +18 -18 lines
Diff to previous 1.20 (colored)

Add a TTY_OPENED flag and tidy a little.

Revision 1.20 / (download) - annotate - [select for diffs], Tue Aug 11 19:32:25 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.19: +11 -6 lines
Diff to previous 1.19 (colored)

Drop the no_stop argument to tty_close and tty_free in favour of a flag in the
tty struct.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Aug 8 13:29:27 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

Change the way the grid is stored, previously it was:

- a two-dimensional array of cells;
- a two-dimensional array of utf8 data;
- an array of line lengths.

Now it is a single array of a new struct grid_line each of which represents a
line and containts the length and an array of cells and an array of utf8 data.

This will make it easier to add additional per-line members, such as flags.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Aug 5 16:26:38 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.17: +21 -7 lines
Diff to previous 1.17 (colored)

If colours are not supported by the terminal, try to emulate a coloured
background by setting or clearing the reverse attribute.

This makes a few applications which don't use the reverse attribute themselves
a little happier, and allows the status, message and mode options to have
default attributes and fg/bg options that work as expected when set as reverse.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Aug 3 14:10:54 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.16: +4 -3 lines
Diff to previous 1.16 (colored)

Add a terminal-overrides session option allowing individual terminfo(5) entries
to be overridden. The 88col/256col checks are now moved into the default
setting and out of the code.

Also remove a couple of old workarounds for xterm and rxvt which are no longer
necessary (tmux can emulate them if missing).

Revision 1.16 / (download) - annotate - [select for diffs], Mon Jul 27 11:33:21 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.15: +6 -3 lines
Diff to previous 1.15 (colored)

Draw UTF-8 characters under the selection correctly.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jul 22 20:56:58 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.14: +32 -1 lines
Diff to previous 1.14 (colored)

tty_write is relatively short and the only function left in tty-write.c so move
it into tty.c.

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jul 22 20:53:38 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.13: +46 -46 lines
Diff to previous 1.13 (colored)

More tty code tidying: move the saved cursor/region position (from before the
screen was updated) out of struct screen and into struct tty_ctx.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Jul 22 18:02:23 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.12: +5 -43 lines
Diff to previous 1.12 (colored)

enum tty_cmd is only used as an index into the array of command function
pointers, so remove it and use the function pointers directly to represent
themselves.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jul 22 16:45:31 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.11: +77 -90 lines
Diff to previous 1.11 (colored)

There are relatively few arguments to tty_cmd_* functions now, so tidy them up
by using a struct rather than hiding everything with varargs.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jul 22 15:55:32 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.10: +11 -8 lines
Diff to previous 1.10 (colored)

tty_cmd_raw is only used once, for raw UTF-8 output, so rename it to
tty_cmd_utf8character and eliminate the size argument.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Jul 10 07:11:59 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.9: +4 -6 lines
Diff to previous 1.9 (colored)

Don't send initialisation strings is1/2/3 (barely anything else does) and move
smcup to the first and rmcup to the last sequences output to the terminal. This
allows tmux to use the alternate screen (smcup/rmcup) when available.

Revision 1.9 / (download) - annotate - [select for diffs], Tue Jul 7 17:24:32 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

Handle empty or unset TERM correctly; also fix a fatal() message while here.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Jun 27 12:57:14 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.7: +5 -1 lines
Diff to previous 1.7 (colored)

Copy the 256-colour flag into the tty saved cell as well as the actual colour,
otherwise colour 8 isn't reset properly.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Jun 25 06:15:04 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.6: +1 -11 lines
Diff to previous 1.6 (colored)

Miscellaneous unused functions, including one which was basically a
duplicate. Found by lint.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Jun 25 05:56:44 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.5: +2 -4 lines
Diff to previous 1.5 (colored)

Unused variables. Found by lint, no binary change.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Jun 24 16:01:02 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.4: +19 -6 lines
Diff to previous 1.4 (colored)

Trying to predict the cursor position for UTF-8 output in the same way as for
normal eight-bit output is wrong, separate it into a different function. Fixes
spacing when mixing UTF-8 with some escape sequences, notably the way w3m does
it.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jun 3 23:30:40 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.3: +21 -1 lines
Diff to previous 1.3 (colored)

Implement the DEC alignment test. With the last change this is enough for the
first cursor test in vttest (in ports) to pass; it still shops a few more
problems though.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jun 3 23:26:56 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

Fix some miscalculations when clearing to start of screen: the number of lines
to the cursor is cy not cy - 1, and the current cursor cell should be included.

Revision 1.2 / (download) - annotate - [select for diffs], Tue Jun 2 23:39:32 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1: +5 -1 lines
Diff to previous 1.1 (colored)

Recent code to try and detect if a terminal supports UTF-8 by printing to it
fails spectacularly on (at least) sparc64, so disable it for now. Thanks to
naddy and Josh Elsasser for help and testing.

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.