Commit Graph

2037 Commits (0d84fdd95303a6ed4dcd761425e35f3731b86725)

Author SHA1 Message Date
nicm 0d84fdd953 Final parts of command hooks, add before- and after- hooks to each command. 2016-04-29 14:05:24 +00:00
nicm c5443da2d3 The backoff timer is causing no end of trouble with disconnected clients
stopping data in attached ones. So get rid of it and see how we get on
with just a high watermark on each pane.
2016-04-29 13:36:10 +00:00
nicm 5f2bfd9807 Make the grid_cell passed into screen_write_* const. 2016-04-29 13:21:33 +00:00
nicm 97417a1813 Fix keys parsing again to correctly accept Unicode when not prefixed
with Escape.
2016-04-29 10:42:16 +00:00
nicm 7abdfbe20e OpenBSD wcwidth() is sensible and complete so if it returns -1 it means
that a character is not printable, so return to ignoring such
characters.
2016-04-29 09:11:19 +00:00
nicm dd8ba0b5a8 memmove() the right size when expanding tree. 2016-04-28 07:20:26 +00:00
nicm 36976ce5e6 After unlock, Update activity time after recalculate_sizes() so that the
session attached flag is correct.
2016-04-28 06:51:56 +00:00
nicm fc70ac4d59 Apply backspace check after working out the actual key, so that M-BSpace
can work.
2016-04-27 16:46:21 +00:00
nicm 1cedf78284 Add next/previous paragraph, from J Raynor. 2016-04-27 09:39:09 +00:00
nicm 23fdbc9ea6 Loads of platforms appear to have old or broken Unicode character type
information and are missing widths for relatively common Unicode
characters (so mbtowc() works, but wcwidth() fails). So if wcwidth()
returns -1, assume a width of 1 instead of ignoring the character.
2016-04-27 09:36:25 +00:00
nicm d3546cc85c Simplify next key matching and fix problems with meta and Unicode keys. 2016-04-26 22:19:22 +00:00
nicm fb1c929dc6 Remove last uses of array.h. 2016-04-26 10:18:57 +00:00
nicm d303e55258 Log wcwidth() and mbtowc() failure to make it easier to debug a Unicode
codepoint not appearing.
2016-04-26 07:33:36 +00:00
nicm 6bf2a43e67 Don't overwrite modifiers in the buffer when making UTF-8 strings,
append instead.
2016-04-25 17:05:53 +00:00
nicm 075c086d29 fatalx() not fatal(). 2016-04-04 16:19:43 +00:00
nicm ec82fcdfea Bump the listen() backlog up, some people have scripts that run up a lot
of clients quickly.
2016-03-30 13:20:07 +00:00
nicm 312a7a1e62 Make scrolling behaviour more sensible and maintain cursor position, as
if the same had been done line-by-line. From Michal Mazurek.
2016-03-18 14:27:24 +00:00
nicm fa97b0a95b Instead of reusing MouseUp at the finish of a drag, add a new key
MouseDragEnd. It can be useful to bind them separately in copy mode.
2016-03-18 07:28:27 +00:00
nicm 0d6de44a37 If setlocale("en_US.UTF-8") succeeds, then don't do the check for UTF-8
locale since if it isn't UTF-8 the system is broken anyway. If it fails,
try "" and check for UTF-8 with nl_langinfo(CODESET) rather than
wcwidth(). Based on a diff from schwarze@, nl_langinfo also suggested by
stsp@.
2016-03-05 16:08:38 +00:00
nicm c38e0a4bbc Do not use c->cwd or s->cwd if it is NULL, found by Ben Boeckel. 2016-03-05 07:47:52 +00:00
nicm 1f0b317088 Although we always have en_US.UTF-8 on OpenBSD, some platforms do not,
so fall back to setlocale(LC_CTYPE, ""). tmux requires a UTF-8 locale,
so check with wcwidth() on a UTF-8 character after setlocale().
2016-03-05 07:44:31 +00:00
nicm df0983af39 show-* and set-* need to handle a missing target. 2016-03-03 14:15:22 +00:00
nicm fa81d838da Accept clients as sessions in cmd_find_get_session. 2016-03-03 14:14:46 +00:00
nicm bcb41a09b3 RGB colours shouldn't be mixed up with aixterm colours, return before
that happens when working out if they are supported.
2016-03-03 12:58:15 +00:00
nicm b8a102d26f Handle wcwidth() and mbtowc() failures in better style and drop
characters where we can't find the width (wcwidth() fails) on input, the
same as we drop invalid UTF-8. Suggested by schwarze@.
2016-03-02 15:36:02 +00:00
nicm d980d965dd Limit x, y and b to 0x7ff for UTF-8 mouse input, suggested by schwarze@. 2016-03-02 15:33:36 +00:00
nicm f0239a8fe9 Remove some more unused variables, and use RB_FOREACH_SAFE in
key_bindings_unref_table.
2016-03-01 12:06:07 +00:00
nicm 2e4503ad4e Redraw status on mode entry and exit. 2016-03-01 12:05:15 +00:00
nicm 54ea8f74ae When a mouse drag is finished, fire a MouseUp key press, instead of
doing the drag end in code. From Stephen Coakley.
2016-03-01 12:04:43 +00:00
nicm e647eeb0c9 Remove unused variables, from Michal Mazurek. 2016-03-01 12:02:54 +00:00
nicm 26945d7956 Use system wcwidth() instead of carrying around UTF-8 width tables. 2016-03-01 12:02:08 +00:00
nicm c7851e0ee7 Fix break-pane synopsis and some other tmux.1 bits. 2016-03-01 11:58:45 +00:00
nicm 4f6bc0a0a9 Expand client formats in run-shell. 2016-02-12 12:24:52 +00:00
nicm bc0c9c7920 Do not wrap cursor at start or end of history, from Michal Mazurek. 2016-02-05 10:20:06 +00:00
nicm bdb8bb790e Set up -t flag properly when passing new-session -A off to
attach-session, GitHub issue 295.
2016-02-04 14:11:20 +00:00
nicm 97882f9ce2 Clear RGB flags during selection. 2016-01-31 14:11:49 +00:00
nicm fa64b89ad7 Whoops, need this for the previous reverse trim commit too. 2016-01-31 09:57:41 +00:00
nicm 49e9f93738 Add RGB escape sequences for capture-pane -e. 2016-01-31 09:57:09 +00:00
nicm 8028560f82 Support negative trim values (#{=-10:pane_title}) to trim from the end,
suggested by Kevin Brubeck Unhammer.
2016-01-31 09:54:46 +00:00
nicm 225a384dbb Fix new-session with -t after command flags changes, reported by Michael Graczyk. 2016-01-31 09:52:01 +00:00
nicm 427b820426 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.
2016-01-29 11:13:56 +00:00
nicm b5b5221c13 Split out getting the current state from the target search so it can be
replaced if we already know the current.
2016-01-19 16:01:30 +00:00
nicm 995af0e2b7 I no longer use my SourceForge address so replace it. 2016-01-19 15:59:12 +00:00
nicm c9815307eb Add hooks for alerts (bell, silence, activity), from Thomas Adam. 2016-01-16 00:36:53 +00:00
nicm d551ab8e5c Clear the environment properly by looping until it is empty rather than
looping over it (which may skip entries), from Brad King.
2016-01-15 11:33:41 +00:00
nicm 68d797587e A couple of missing printflike attributes, from Andrey Starodubtsev. 2016-01-15 11:31:47 +00:00
nicm cfb78654c2 clock-mode needs CMD_PANE. 2016-01-02 17:16:25 +00:00
nicm 311be04d61 Don't rely on a calculation wrapping when applying message-limit, and
break out of the loop early. From Nicolas Viennot.
2016-01-01 08:04:20 +00:00
nicm 7e67db79dc Remove an extra unzoom call which was probably a merge error. 2015-12-31 18:34:47 +00:00
nicm f84d32ca5e Use saved pipe buffer offset when writing to pipe, from Nicolas Viennot. 2015-12-31 18:14:13 +00:00