OpenBSD CVS

CVS log for src/usr.bin/tmux/input-keys.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.94 / (download) - annotate - [select for diffs], Thu Jan 12 18:49:11 2023 UTC (16 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.93: +4 -1 lines
Diff to previous 1.93 (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.93 / (download) - annotate - [select for diffs], Tue Nov 8 10:04:31 2022 UTC (18 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.92: +2 -2 lines
Diff to previous 1.92 (colored)

Fix C-S-Tab without extended keys, from Aaron Jensen.

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

Instead of always setting the extended flag, set it only when searching.
Allows send-keys to work. From Aaron Jensen.

Revision 1.91 / (download) - annotate - [select for diffs], Tue Nov 1 09:54:13 2022 UTC (18 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.90: +19 -1 lines
Diff to previous 1.90 (colored)

Add modified Tab key sequences, from Aaron Jensen, GitHub issue 3368.

Revision 1.90 / (download) - annotate - [select for diffs], Mon May 30 13:02:55 2022 UTC (23 months, 2 weeks ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.89: +24 -9 lines
Diff to previous 1.89 (colored)

If a mouse position was above the maximum supported by the normal mouse
protocol (223), tmux was allowing it to wrap around. However, since tmux
was not correctly handling this on input, other programs also do not
handle it correctly, and the alternative SGR mouse mode is now
widespread, this seems unnecessary, so remove this feature. Also define
some constants to make it clearer what the numbers mean. Mostly from
Leonid S Usov in GitHub issue 3165.

Revision 1.89 / (download) - annotate - [select for diffs], Tue Mar 1 15:20:22 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.88: +2 -2 lines
Diff to previous 1.88 (colored)

Don't convert codes for special keys (Tab, Enter, Escape).

Revision 1.88 / (download) - annotate - [select for diffs], Mon Feb 28 09:24:22 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.87: +8 -3 lines
Diff to previous 1.87 (colored)

Map control keys back to an ASCII uppercase letter when passing them on
as extended keys.

Revision 1.87 / (download) - annotate - [select for diffs], Wed Feb 16 18:55:05 2022 UTC (2 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.86: +4 -4 lines
Diff to previous 1.86 (colored)

Support more mouse buttons when the terminal sends them, GitHub issue
3055.

Revision 1.86 / (download) - annotate - [select for diffs], Fri Aug 20 17:50:42 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.85: +2 -2 lines
Diff to previous 1.85 (colored)

Remove stray spaces after function names.

Revision 1.85 / (download) - annotate - [select for diffs], Thu Jun 10 07:52:07 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.84: +1 -25 lines
Diff to previous 1.84 (colored)

Remove old shift function keys which interfere with xterm keys now.
GitHub issue 2696.

Revision 1.84 / (download) - annotate - [select for diffs], Thu Jun 10 07:38:28 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.83: +2 -2 lines
Diff to previous 1.83 (colored)

Move "special" keys into the Unicode PUA rather than making them top bit
set, some compilers do not allow enums that are larger than int. GitHub
issue 2673.

Revision 1.83 / (download) - annotate - [select for diffs], Fri Apr 9 07:02:00 2021 UTC (3 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.82: +2 -2 lines
Diff to previous 1.82 (colored)

Change a type to fix a warning with some compilers.

Revision 1.82 / (download) - annotate - [select for diffs], Thu Apr 8 14:16:12 2021 UTC (3 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.81: +18 -10 lines
Diff to previous 1.81 (colored)

Log the key written to the terminal as well as tmux's idea of what it
is.

Revision 1.81 / (download) - annotate - [select for diffs], Tue Nov 17 08:13:35 2020 UTC (3 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.80: +4 -3 lines
Diff to previous 1.80 (colored)

Log missing keys when extended keys is on rather than fatal().

Revision 1.80 / (download) - annotate - [select for diffs], Fri Sep 18 11:20:59 2020 UTC (3 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.79: +3 -1 lines
Diff to previous 1.79 (colored)

Some other warnings, GitHub issue 2382.

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

Try without cursor/keypad flags if a key doesn't exist, and limit ctrl
key translation to ASCII keys. Fixes send-keys, GitHub issue 2247.

Revision 1.78 / (download) - annotate - [select for diffs], Mon May 25 18:57:25 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.77: +2 -3 lines
Diff to previous 1.77 (colored)

Use the internal representation for UTF-8 keys instead of wchar_t and
drop some code only needed for that.

Revision 1.77 / (download) - annotate - [select for diffs], Tue May 19 10:59:09 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.76: +30 -5 lines
Diff to previous 1.76 (colored)

Some other ctrl keys need to be translated with extended keys on.

Revision 1.76 / (download) - annotate - [select for diffs], Sat May 16 16:44:54 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.75: +7 -61 lines
Diff to previous 1.75 (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.75 / (download) - annotate - [select for diffs], Sat May 16 16:38:55 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.74: +101 -13 lines
Diff to previous 1.74 (colored)

Send CSI u sequences for any keys that do not have a defined sequence
already - this should only be similar sequences sent by the terminal
outside tmux if enabled.

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

Separate key flags and modifiers, log key flags, make the "xterm" flag
more explicit and fix M- keys with a leading escape.

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

Rename KEYC_ESCAPE to KEYC_META.

Revision 1.72 / (download) - annotate - [select for diffs], Sat May 16 16:30:59 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.71: +372 -140 lines
Diff to previous 1.71 (colored)

xterm-keys has been on by default for five years and all other modern
terminals use these key sequences by default. Merge the code into the
main tty and input tree processing (converting the latter to use a tree
rather than a table at the same time) and make the option a no-op.

Revision 1.71 / (download) - annotate - [select for diffs], Tue Apr 7 13:38:30 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.70: +3 -1 lines
Diff to previous 1.70 (colored)

Do not send mouse events if the program has not requested them.

Revision 1.70 / (download) - annotate - [select for diffs], Wed Apr 1 09:05:27 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.69: +37 -19 lines
Diff to previous 1.69 (colored)

Support mouse in popups.

Revision 1.69 / (download) - annotate - [select for diffs], Thu Mar 19 14:03:48 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.68: +31 -23 lines
Diff to previous 1.68 (colored)

Change input path so it doesn't require a pane.

Revision 1.68 / (download) - annotate - [select for diffs], Mon Mar 16 06:12:42 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.67: +6 -7 lines
Diff to previous 1.67 (colored)

Send mouse down event immediately rather than waiting for double click
to finish which would now mean it was out of order. Reported by Mark
Kelly.

Revision 1.67 / (download) - annotate - [select for diffs], Mon Jan 13 07:51:54 2020 UTC (4 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.66: +10 -9 lines
Diff to previous 1.66 (colored)

Treat plausible but invalid keys (like C-BSpace) as literal like any
other unrecognised string passed to send-keys. Reported by Anthony
Sottile in GitHub issue 2049.

Revision 1.66 / (download) - annotate - [select for diffs], Mon Nov 18 09:42:09 2019 UTC (4 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.65: +6 -5 lines
Diff to previous 1.65 (colored)

Keep modifiers on backspace when translating it.

Revision 1.65 / (download) - annotate - [select for diffs], Thu Nov 14 07:55:01 2019 UTC (4 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.64: +8 -4 lines
Diff to previous 1.64 (colored)

Add an option to set the key sent by backspace for those whose system
uses ^H rather than ^?. GitHub issue 1969.

Revision 1.64 / (download) - annotate - [select for diffs], Tue Jul 9 14:03:12 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.63: +8 -1 lines
Diff to previous 1.63 (colored)

Add a -H flag to send-keys to send literal keys given as hex numbers
(needed for control clients to send mouse sequences). Also add some
format flags for UTF-8 and SGR mouse mode. Requested by Bradley Smith in
GitHub issues 1832 and 1833.

Revision 1.63 / (download) - annotate - [select for diffs], Thu Oct 18 08:38:01 2018 UTC (5 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.62: +3 -3 lines
Diff to previous 1.62 (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.62 / (download) - annotate - [select for diffs], Wed Jun 28 11:36:39 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored)

Apply the xterm key flag when needed for send-keys, fixes problem
reported by Franky Spamschleuder.

Revision 1.61 / (download) - annotate - [select for diffs], Mon Jun 12 07:04:24 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.60: +5 -1 lines
Diff to previous 1.60 (colored)

Add explicit keys for the bracketed paste sequences, both to avoid mix
ups with other keys and to make logs clearer.

Revision 1.60 / (download) - annotate - [select for diffs], Sun May 7 21:25:59 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.59: +2 -1 lines
Diff to previous 1.59 (colored)

Up to now, tmux sees \033\033[OA as M-Up and since we turned on
xterm-keys by default, generates \033[1;3A instead of
\033\033[OA. Unfortunately this confuses vi, which doesn't understand
xterm keys and now sees Escape+Up pressed within escape-time as Escape
followed by A.

The issue doesn't happen in xterm itself because it gets the keys from X
and can distinguish between a genuine M-Up and Escape+Up.

Because xterm can, tmux can too: xterm will give us \033[1;3A (that is,
kUP3) for a real M-Up and \033\033OA for Escape+Up - in fact, we can be
sure any \033 preceding an xterm key is a real Escape key press because
Meta would be part of the xterm key instead of a separate \033.

So change tmux to recognise both sequences as M-Up for its own purposes,
but generate the xterm version of M-Up only if it originally received
the xterm version from the terminal.

This means we will return to sending \033\033OA instead of the xterm key
for terminals that do not support xterm keys themselves, but there is no
practical way around this because they do not allow us to distinguish
between Escape+Up and M-Up. xterm style escape sequences are now the de
facto standard for these keys in any case.

Problem reported by jsing@ and subsequently by Cecile Tonglet in GitHub
issue 907.

Revision 1.59 / (download) - annotate - [select for diffs], Wed Feb 1 09:55:07 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.58: +32 -10 lines
Diff to previous 1.58 (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.58 / (download) - annotate - [select for diffs], Wed Jan 25 14:36:08 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.57: +5 -5 lines
Diff to previous 1.57 (colored)

Revert previous for now, it will break TERM=screen.

Revision 1.57 / (download) - annotate - [select for diffs], Wed Jan 25 14:24:54 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.56: +6 -6 lines
Diff to previous 1.56 (colored)

If xterm-keys is on, use xterm(1) style keys for Home and End as well as
modified keys.

Revision 1.56 / (download) - annotate - [select for diffs], Mon Oct 3 22:52:11 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.55: +4 -4 lines
Diff to previous 1.55 (colored)

Remove some dead code in cmd-move-window.c and make a load of local
functions static.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Mar 2 15:33:36 2016 UTC (8 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.54: +3 -1 lines
Diff to previous 1.54 (colored)

Limit x, y and b to 0x7ff for UTF-8 mouse input, suggested by schwarze@.

Revision 1.54 / (download) - annotate - [select for diffs], Tue Mar 1 12:02:08 2016 UTC (8 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.53: +17 -4 lines
Diff to previous 1.53 (colored)

Use system wcwidth() instead of carrying around UTF-8 width tables.

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

I no longer use my SourceForge address so replace it.

Revision 1.52 / (download) - annotate - [select for diffs], Sat Dec 12 18:19:00 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.51: +3 -3 lines
Diff to previous 1.51 (colored)

Allow prefix and prefix2 to be set to None to disable (useful if you
would rather bind the prefix in the root table).

Revision 1.51 / (download) - annotate - [select for diffs], Mon Nov 23 23:47:57 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.50: +7 -1 lines
Diff to previous 1.50 (colored)

Partly revert previous, it is harmless to keep support for UTF-8 mouse
mode inside tmux, just no longer support it for tmux itself.

Revision 1.50 / (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.49: +1 -7 lines
Diff to previous 1.49 (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.49 / (download) - annotate - [select for diffs], Mon Nov 16 22:57:51 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.48: +2 -2 lines
Diff to previous 1.48 (colored)

0x7f is a valid key.

Revision 1.48 / (download) - annotate - [select for diffs], Sat Nov 14 11:45:43 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)

All these return values from utf8_* are confusing, use an enum.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Nov 12 22:04:37 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.46: +6 -6 lines
Diff to previous 1.46 (colored)

Rename overly-long utf8data to ud throughout.

Revision 1.46 / (download) - annotate - [select for diffs], Thu Nov 12 11:05:34 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.45: +25 -15 lines
Diff to previous 1.45 (colored)

Support UTF-8 key bindings by expanding the key type from int to
uint64_t and converting UTF-8 to Unicode on input and the reverse on
output. (This allows key bindings, there are still omissions - the
largest being that the various prompts do not accept UTF-8.)

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

Move struct options into options.c.

Revision 1.44 / (download) - annotate - [select for diffs], Mon Oct 26 17:17:06 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.43: +4 -3 lines
Diff to previous 1.43 (colored)

Some extra logging of where keys are actually going.

Revision 1.43 / (download) - annotate - [select for diffs], Tue Apr 21 15:21:41 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.42: +2 -1 lines
Diff to previous 1.42 (colored)

Don't eat the mouse event that triggers a drag end because we may want
to pass it on to application inside the pane.

Revision 1.42 / (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.41: +50 -49 lines
Diff to previous 1.41 (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.41 / (download) - annotate - [select for diffs], Tue Mar 31 17:45:10 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

Fix some format specifier nits, from Ben Boeckel.

Revision 1.40 / (download) - annotate - [select for diffs], Wed Nov 5 23:25:02 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.39: +12 -14 lines
Diff to previous 1.39 (colored)

Tidy up mode-mouse check.

Revision 1.39 / (download) - annotate - [select for diffs], Mon Jul 21 20:45:35 2014 UTC (9 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.38: +1 -16 lines
Diff to previous 1.38 (colored)

Revert the up/down wheel emulation for now, there will be a better way
to do this along later for those who want it.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Jul 21 10:25:48 2014 UTC (9 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.37: +9 -9 lines
Diff to previous 1.37 (colored)

Drop explicit support for F13-F20 and change to match the xterm terminfo
entry:

        F13-F24 are S-F1 to S-F12
        F25-F36 are C-F1 to C-F12
        F37-F48 are C-S-F1 to C-S-F12
        F49-F60 are M-F1 to M-F12
and     F61-F63 are M-S-F1 to M-S-F3

This should be no difference for applications inside tmux, but means
that any key binding for F13 will need to be replaced by S-F1 and so on.

Revision 1.37 / (download) - annotate - [select for diffs], Thu May 8 07:59:16 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.36: +16 -1 lines
Diff to previous 1.36 (colored)

Send up and down keys for mouse wheel in alternate screen mode (when it
normally does nothing), from Marcel Partap.

Revision 1.36 / (download) - annotate - [select for diffs], Thu Apr 24 09:14:43 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

There is no longer a need for a paste_stack struct or for global_buffers
to be global. Move to paste.c.

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

A couple of trivial mouse-related style nits.

Revision 1.34 / (download) - annotate - [select for diffs], Mon Mar 31 21:42:45 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.33: +4 -4 lines
Diff to previous 1.33 (colored)

Remove log_debug2 as well and simplify log.c.

Revision 1.33 / (download) - annotate - [select for diffs], Tue May 7 11:00:16 2013 UTC (11 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

Don't limit width and height to 222 in standard mouse mode.

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

Add resize-pane -Z to temporary zoom the active pane to occupy the full
window or unzoom (restored to the normal layout) if it already zoomed,
bound to C-b z by default. The pane is unzoomed on pretty much any
excuse whatsoever.

We considered making this a new layout but the requirements are quite
different from layouts so decided it is better as a special case. Each
current layout cell is saved, a temporary one-cell layout generated and
all except the active pane set to NULL.

Prompted by suggestions and scripts from several. Thanks to Aaron Jensen
and Thiago Padilha for testing an earlier version.

Revision 1.31 / (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.30: +16 -3 lines
Diff to previous 1.30 (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.30 / (download) - annotate - [select for diffs], Tue Nov 27 20:22:12 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.29: +11 -4 lines
Diff to previous 1.29 (colored)

Support middle-click paste, based on a diff from Ailin Nemui.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Nov 27 14:26:48 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.28: +1 -2 lines
Diff to previous 1.28 (colored)

Revert last, after discussion it isn't necessary.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Nov 27 14:22:43 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.27: +3 -2 lines
Diff to previous 1.27 (colored)

If the application inside tmux has requested any mouse modes itself, do
not let mode-mouse take any effect. From Sergey Naumov.

Revision 1.27 / (download) - annotate - [select for diffs], Fri Oct 26 14:35:42 2012 UTC (11 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.26: +7 -7 lines
Diff to previous 1.26 (colored)

Make mouse event structure clearer by defining events (up, click, drag)
and simplifying how buttons and wheels are represented, from Ailin
Nemui. Should be no functional changes.

Revision 1.26 / (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.25: +2 -2 lines
Diff to previous 1.25 (colored)

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

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

Only enter copy mode on scroll up, from Ailin Nemui.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Apr 1 20:56:47 2012 UTC (12 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.23: +7 -6 lines
Diff to previous 1.23 (colored)

Simplify mouse input function.

Revision 1.23 / (download) - annotate - [select for diffs], Sat Jul 30 18:01:26 2011 UTC (12 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.22: +4 -2 lines
Diff to previous 1.22 (colored)

Extend the mode-mouse option to add a third choice which means the mouse
does not enter copy mode. Patch from SF bug 3374493.

In future the mode-mouse option is likely to die and be broken into
several smaller options.

Revision 1.22 / (download) - annotate - [select for diffs], Tue Apr 19 21:31:33 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.21: +8 -1 lines
Diff to previous 1.21 (colored)

When mode-mouse is on (it is off by default), automatically enter copy
mode when the mouse is dragged or the mouse wheel is used. Also exit
copy mode when the mouse wheel is scrolled off the bottom. Discussed
with and written by hsim at gmx dot li.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Jan 3 23:35:21 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.20: +17 -5 lines
Diff to previous 1.20 (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.20 / (download) - annotate - [select for diffs], Sat Jan 1 03:43:20 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.19: +7 -7 lines
Diff to previous 1.19 (colored)

Last few tables that should be const.

Revision 1.19 / (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.18: +2 -2 lines
Diff to previous 1.18 (colored)

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

Revision 1.18 / (download) - annotate - [select for diffs], Thu Dec 3 22:50:10 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.17: +4 -4 lines
Diff to previous 1.17 (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.17 / (download) - annotate - [select for diffs], Wed Nov 25 12:24:31 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.16: +34 -34 lines
Diff to previous 1.16 (colored)

Output the right keys for application and number keypad modes (they were the
wrong way round).

Revision 1.16 / (download) - annotate - [select for diffs], Tue Nov 10 18:48:03 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.15: +1 -23 lines
Diff to previous 1.15 (colored)

Don't output rxvtisms either.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Nov 4 23:00:22 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.14: +3 -4 lines
Diff to previous 1.14 (colored)

It would help if I read my own comments... make alt keys work again by sending
alt AND the key not alt instead of it.

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

Convert the window pane (pty master side) fd over to use a bufferevent.

The evbuffer API is very similar to the existing tmux buffer API so this was
remarkably painless. Not many possible ways to do it, I suppose.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Oct 26 17:59:46 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.12: +5 -2 lines
Diff to previous 1.12 (colored)

Not all terminals swap CSI and SS3 on ctrl, so remove that.

Also mark the rxvt special-cases as such until terminfo is updated to have
kLFT5, kRIT5 etc.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Oct 26 17:46:33 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.11: +13 -1 lines
Diff to previous 1.11 (colored)

Rewrite xterm-keys code (both input and output) so that works (doesn't always
output the same modifiers, accepts all the possible input keys) and is more
understandable.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Oct 26 14:30:57 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.10: +1 -13 lines
Diff to previous 1.10 (colored)

On second thoughts, drop the rxvt output entirely.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Oct 26 14:27:13 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.9: +8 -5 lines
Diff to previous 1.9 (colored)

Set the output code for ctrl+cursor keys correctly, and disable (comment)
rxvt-style output.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Oct 26 13:34:26 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.8: +62 -43 lines
Diff to previous 1.8 (colored)

Drop INPUTKEY_CTRL and just handle it as part of the table.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Oct 26 13:29:24 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.7: +17 -10 lines
Diff to previous 1.7 (colored)

Add or fix some comments.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Oct 26 13:22:30 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.6: +83 -82 lines
Diff to previous 1.6 (colored)

Tidy up table.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Oct 26 13:13:33 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.5: +33 -33 lines
Diff to previous 1.5 (colored)

Rename keypad keys to something more useful.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Oct 26 13:02:53 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.4: +27 -59 lines
Diff to previous 1.4 (colored)

Remove the xterm-keys code which is broken (a replacement is coming but some
more cleanup is needed first).

Revision 1.4 / (download) - annotate - [select for diffs], Sun Oct 11 07:01:10 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.3: +5 -5 lines
Diff to previous 1.3 (colored)

Clean up by introducing a wrapper struct for mouse clicks rather than passing
three u_chars around.

As a side-effect this fixes incorrectly rejecting high cursor positions
(because it was comparing them as signed char), reported by Tom Doherty.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Jul 26 21:42:08 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.2: +4 -1 lines
Diff to previous 1.2 (colored)

Detect backspace by looking at termios VERASE and translate it into \177 (which
matches screen's behaviour if not its termcap/terminfo entry). The terminfo kbs
cap is often wrong or missing so it can't be used, and just assuming \177 may
be wrong.

Revision 1.2 / (download) - annotate - [select for diffs], Tue Jul 21 17:57:29 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.1: +26 -26 lines
Diff to previous 1.1 (colored)

Tidy up keys: use an enum for the key codes, and remove the macros which just
wrap flag sets/clears/tests.

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
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6

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.