Commit Graph

2024 Commits (c744964cd96554415a8a707c47eef3e0db0a60af)

Author SHA1 Message Date
Tiago Cunha 8512811535 Sync OpenBSD patchset 551:
Revert to xterm-keys off by default. It was on as an experiment to see if the
option could be removed, but it affects vi, so we have to keep the option, and
a conservative default is better.
2009-11-19 22:31:27 +00:00
Tiago Cunha 224ae13ab0 Sync OpenBSD patchset 550:
Tidy up by breaking the # replacement code into a separate function, also add a
few comments.
2009-11-19 22:30:39 +00:00
Tiago Cunha 5fd1cf743e Update. 2009-11-19 22:28:59 +00:00
Tiago Cunha 563f34477a Sync OpenBSD patchset 549:
Don't interpret #() for display-message, it usually doesn't make sense and may
leak commands.
2009-11-19 22:25:52 +00:00
Tiago Cunha a5ae0dc216 Sync OpenBSD patchset 548:
Missed an unused variable :-/.
2009-11-19 22:24:17 +00:00
Tiago Cunha a0b2b8e875 Sync OpenBSD patchset 547:
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.
2009-11-19 22:23:27 +00:00
Tiago Cunha acc331c787 Sync OpenBSD patchset 546:
Add a per-client log of status line messages displayed while that client
exists. A new message-limit session option sets the maximum number of entries
and a command, show-messages, shows the log (bound to ~ by default).

This (and prompt history) might be better as a single global log but until
there are global options it is easier for them to be per client.
2009-11-19 22:20:04 +00:00
Tiago Cunha 8777a809dc Sync OpenBSD patchset 545:
Mark -n keys with (no prefix) rather than [].
2009-11-19 22:15:58 +00:00
Nicholas Marriott ec48709dc2 +. 2009-11-18 13:56:06 +00:00
Tiago Cunha 9829cfc8d2 Sync OpenBSD patchset 544:
Permit top-bit-set characters to be entered in the status line. They could
already be set from the shell and are just passed through when printing (so
invisible characters or displaying on terminals with different character sets
may cause problems).

Note that entering UTF-8 may not work and in any case currently the status line
cannot display it correctly (outside of status-left/status-right).
2009-11-18 01:28:43 +00:00
Tiago Cunha 4c2e037046 Sync OpenBSD patchset 543:
In choose mode, assign each item a number or lowercase letter from those
available and accept that as a shortcut key for the item.
2009-11-18 01:27:33 +00:00
Tiago Cunha 1c97866a5f Sync OpenBSD patchset 542:
A screen can be one cell wide; don't crash if that is the case.
2009-11-18 01:25:35 +00:00
Tiago Cunha 063a474fe0 Sync OpenBSD patchset 541:
I made a complete horlicks of the last change, fix it so it doesn't either lead
to a double free or free the item after the end of the array.
2009-11-18 01:24:33 +00:00
Tiago Cunha a7158784f2 Sync OpenBSD patchset 540:
Tweak a comment and add some spacing.
2009-11-14 17:57:41 +00:00
Tiago Cunha e35f5b35bd Sync OpenBSD patchset 539:
Get rid of the ugly CMD_CHFLAG macro and use a const string (eg "dDU") in the
command entry structs and a couple of functions to check/set the flags.
2009-11-14 17:56:39 +00:00
Tiago Cunha fc6a835be8 Sync OpenBSD patchset 538:
Unreachable statement, found by lint.
2009-11-14 17:52:04 +00:00
Tiago Cunha ee9be88946 Sync OpenBSD patchset 537:
Tidy up and fix some types, prompted by lint via deraadt.
2009-11-14 17:51:06 +00:00
Tiago Cunha 0bb00a0df3 Sync OpenBSD patchset 536:
imsg_read returns ssize_t not int, pointed out by lint via deraadt.
2009-11-14 17:49:37 +00:00
Tiago Cunha 72bc03ac4c Sync OpenBSD patchset 535:
Destroy panes immediately rather than checking them all every loop.
2009-11-14 17:48:39 +00:00
Tiago Cunha 56447d73c1 Sync OpenBSD patchset 534:
Use winlink_remove() to remove old winlinks when synchronizing grouped sessions
rather than doing it manually and not adjusted the reference count. Fixes
crash seen by Dan Harnett.
2009-11-13 16:59:19 +00:00
Tiago Cunha 0986001908 Sync OpenBSD patchset 533:
Zap unused functions, prompted by deraadt.
2009-11-13 16:58:24 +00:00
Tiago Cunha 2bd39071d3 Sync OpenBSD patchset 532:
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).
2009-11-13 16:57:21 +00:00
Tiago Cunha ac6b1a817b Sync OpenBSD patchset 531:
Support rxvt-style keys again, but this time: support all the variations, put
them in as raw escape sequences rather than fiddling with the values from
terminfo, put them /after/ the terminfo values so the latter take precedence.
2009-11-13 16:56:15 +00:00
Tiago Cunha ba832ff2c3 Sync OpenBSD patchset 530:
Rewrite a confusing loop when freeing the arg array on exit and move the check
for argv being NULL, prompted by parfait via deraadt.

Also fix some definite brokenness when assigning multiple environment variables
in arguments (such as "X=1 Y=2").
2009-11-13 16:55:10 +00:00
Tiago Cunha 2ec5aca064 Sync OpenBSD patchset 529:
Add an explicit zero-length check for UTF-8 input data, prompted by a report
from parfait via deraadt.

While here, add a statement to set the width when filling with _s if not enough
space (width should never be high enough at the moment anyway), and wrap some
long lines.
2009-11-13 16:54:04 +00:00
Tiago Cunha e8424d333e Sync OpenBSD patchset 528:
Free the pane bufferevent when the fd is closed (the signal could come before
the error callback).
2009-11-13 16:52:46 +00:00
Tiago Cunha 1b4a76d58f Sync OpenBSD patchset 527:
Only need to chmod +x or -x the socket when a client is created, lost or
attached, rather than every event loop.
2009-11-13 16:51:49 +00:00
Nicholas Marriott 7230fe1648 OS X is still broken, so ask libevent not to use kqueue or poll. 2009-11-11 09:54:07 +00:00
Tiago Cunha 60869fa4c3 Sync OpenBSD patchset 526:
There is no real standard for modifier plus function keys. Previously, tmux
output some from rxvt but in other ways did the same as xterm or other
terminals, but this is a bit inconsistent.

xterm's method is fairly sensible and we already support it (xterm-keys), so
enable it by default instead.
2009-11-10 23:34:03 +00:00
Tiago Cunha ba7aa506f3 Sync OpenBSD patchset 525:
Don't output rxvtisms either.
2009-11-10 23:32:53 +00:00
Tiago Cunha 9817d41947 Sync OpenBSD patchset 524:
Twiddling the last bit is an rxvtism, so do not support it in the table by
default.
2009-11-10 23:32:09 +00:00
Tiago Cunha 74e742113d Sync OpenBSD patchset 523:
Whoops, this is needed for last commit as well.
2009-11-10 23:31:21 +00:00
Tiago Cunha e9b357550f Sync OpenBSD patchset 522:
Lookup key as a named key (eg 'Space') before checking for single character
keys, makes C-Space/M-Space etc resolve to the correct key code.
2009-11-10 23:30:26 +00:00
Tiago Cunha 38ac9bb414 Sync OpenBSD patchset 521:
Don't return 1 unless there was actually a problem (signal/lost server) rather
than for all events (normal exit/detach/etc).
2009-11-10 23:28:53 +00:00
Tiago Cunha c01816c26d Sync OpenBSD patchset 520:
Just ignore tty fd errors rather than dying, stops the server dying if the
session is disconnected abrubtly (eg ssh ~.).
2009-11-10 23:27:57 +00:00
Tiago Cunha 36bb298bfa Sync OpenBSD patchset 519:
The input key should be a u_char. Fixes top-bit-set input problem reported by
ajacoutot@.
2009-11-10 23:27:03 +00:00
Tiago Cunha e275bc52f2 Sync OpenBSD patchset 518:
Constify buf.
2009-11-10 23:26:13 +00:00
Nicholas Marriott ef45c1c65b +. 2009-11-10 15:33:31 +00:00
Nicholas Marriott c202377859 +. 2009-11-09 20:03:31 +00:00
Tiago Cunha 34b4c2e607 Sync OpenBSD patchset 517:
Don't try enable/disable the event if the window pane is dead (fd == -1), as
the event will have been freed.
2009-11-08 23:35:53 +00:00
Tiago Cunha dcb85fe4b1 Sync OpenBSD patchset 516:
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.
2009-11-08 23:34:47 +00:00
Tiago Cunha 8fe9ecae05 Sync OpenBSD patchset 515:
Old xterm F1-F4 are \033O_P not \033[O_P.
2009-11-08 23:33:57 +00:00
Tiago Cunha 946337484e Sync OpenBSD patchset 514:
Unused variable. Aargh.
2009-11-08 23:33:17 +00:00
Tiago Cunha 181e1cc711 Sync OpenBSD patchset 513:
Switch the tty key tree over to an (unbalanced) ternary tree which allows
partial matches to be done (they wait for further data or a timer to expire,
like a naked escape).

Mouse and xterm-style keys still expect to be atomic.
2009-11-08 23:32:39 +00:00
Tiago Cunha f18b224983 Sync OpenBSD patchset 512:
key_string_lookup_key uses a static buffer, so copy its output into the working
buffer before calling the command print function which can also use it (eg
send-keys).
2009-11-08 23:30:42 +00:00
Tiago Cunha 7d288e7fd8 Sync OpenBSD patchset 511:
Key flags are only used for initialisation so they are not needed in the main
tty_key struct.
2009-11-08 23:29:34 +00:00
Tiago Cunha fb22aaf87f Sync OpenBSD patchset 510:
EVLOOP_ONCE takes care of the wakeup, so no need to call event_loopexit(NULL).
2009-11-08 23:28:40 +00:00
Tiago Cunha 5ac6ea61bd Sync OpenBSD patchset 509:
Now all timers are events, there is no longer any need to wake up every 50 ms -
only wake up when an event happens.
2009-11-08 23:27:58 +00:00
Tiago Cunha 66957412d5 Sync OpenBSD patchset 508:
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.
2009-11-08 23:26:56 +00:00
Tiago Cunha ac6092c27f Sync OpenBSD patchset 507:
Convert the key repeat timer to an event.
2009-11-08 23:24:59 +00:00