Commit Graph

1671 Commits

Author SHA1 Message Date
nicm
b1a06ef22e Add a copy mode key binding to copy to a named buffer. From J Raynor. 2014-05-13 07:54:20 +00:00
nicm
3dbacbb62b Add support for named buffers. If you don't name a buffer, things work
much as before - buffers are automatically named "buffer0000",
"buffer0001" and so on and ordered as a stack. Buffers can be named
explicitly when creating ("loadb -b foo" etc) or renamed ("setb -b
buffer0000 -n foo"). If buffers are named explicitly, they are not
deleted when buffer-limit is reached. Diff from J Raynor.
2014-05-13 07:34:35 +00:00
nicm
f4ffaf5a7f Just use char ** for argv like normal people, not char *const *. 2014-05-09 09:11:24 +00:00
nicm
353d1825d5 Send up and down keys for mouse wheel in alternate screen mode (when it
normally does nothing), from Marcel Partap.
2014-05-08 07:59:16 +00:00
nicm
94ccc6aeaa Instead of forcing mouse scroll to 1 in choose mode, scale it down
instead. Means modifier keys still increase the line count, just not as
much. Based on a diff from Marcel Partap.
2014-05-08 07:54:47 +00:00
nicm
189017c078 Plug a memory leak, from J Raynor. 2014-05-08 06:06:07 +00:00
nicm
540f0b3e45 Both the two previous ways of navigating panes by direction have
irritating flaws:

a) The old way of always using the top or left if the choice is
ambiguous is annoying when the layout is unbalanced.

b) The new way of remembering the last used pane is annoying if the
layout is balanced and the leftmost is obvious to the user (because
clearly if we go right from the top-left in a tiled set of four we want
to end up in top-right, even if we were last using the bottom-right).

So instead, use a combination of both: if there is only one possible
pane alongside the current pane, move to it, otherwise choose the most
recently used of the choice.
2014-05-08 06:03:30 +00:00
nicm
6369ea10d7 Handle colour 8 properly in the 256 colour palette, from Timothy Allen. 2014-05-08 05:53:29 +00:00
nicm
5b2c8156d5 fcntl.h is still needed here. 2014-04-29 22:31:22 +00:00
jsg
40cb4cb086 specifying ECHOCTL once is enough
ok nicm@
2014-04-25 12:45:16 +00:00
nicm
bec6c807cd There is no longer a need for a paste_stack struct or for global_buffers
to be global. Move to paste.c.
2014-04-24 09:14:43 +00:00
nicm
7ab2690be8 Differentiate between linked and unlinked window closes and renames,
like we already do for adds. From Andre Masella.
2014-04-23 10:14:29 +00:00
nicm
64613b9d41 #nnT went away a while ago, remove a leftover from the manpage. 2014-04-17 15:48:02 +00:00
nicm
806520f025 Add some UTF-8 utility functions and use them to prevent the width limit
on formats from splitting UTF-8 characters improperly.
2014-04-17 15:37:55 +00:00
nicm
a5d4b7f3d9 Some more long lines. 2014-04-17 14:45:49 +00:00
nicm
f194f103a2 Only scroll by one line at a time in choose mode, lists are generally
pretty small.
2014-04-17 14:13:59 +00:00
nicm
3e27be353d Set PATH explicitly, either from client or session
environment. Previously it came from the session environment. From J
Raynor.
2014-04-17 13:02:59 +00:00
nicm
c3b2e5eed3 Wrap some long lines. 2014-04-17 12:57:28 +00:00
nicm
ada75af199 Don't limit the DCS buffer to 256 bytes, expand it as needed. Requested
by Suraj Kurapati.
2014-04-17 12:43:38 +00:00
nicm
bce952777a Remove some unnecessary includes and fix a typo. 2014-04-17 11:38:35 +00:00
nicm
2e98c9057d Correct the dance to fix the active pane in join-pane by pulling the
(right) code from break-pane and window_remove_pane into a helper
function.
2014-04-17 09:13:13 +00:00
nicm
2740490e27 Remove the "info" message mechanism, this was only used for about five
mostly useless and annoying messages. Change those commands to silence
on success like all the others. Still accept the -q command line flag
and "quiet" server option for now.
2014-04-17 07:55:43 +00:00
nicm
877bdb46ed Extend the -q flag to set-option to suppress errors about unknown
options - this will allow options to be removed more easily.
2014-04-17 07:51:38 +00:00
nicm
ebc5cb447f Do not show the -fg, -bg and -attr options. If asked for one explicitly,
show the equivalent -style option instead.
2014-04-17 07:43:20 +00:00
nicm
992ef70fb6 Remove the monitor-content option and associated bits and bobs. It's
never worked very well. If there is a big demand for it to return, will
consider better ways to do it.
2014-04-17 07:36:45 +00:00
nicm
5acee1c04e Memory leak in error path and unnecessary assignment, from clang. 2014-04-16 23:05:38 +00:00
nicm
871b83cbab Remove a leftover prototype and fix some spacing. 2014-04-16 21:16:19 +00:00
nicm
14a96df9ee Remove the choose-list command to prepare for some later choose-* work. 2014-04-16 21:02:41 +00:00
nicm
e5d85c6c3c Because we pass the file descriptor from client to server, tmux can't
usefully work if stdin is /dev/tty. Complain about it more clearly.
2014-04-16 08:02:31 +00:00
nicm
a47d2397df Don't leak socketpair file descriptors if fork fails. Spotted by Balazs
Kezes.
2014-04-14 22:27:30 +00:00
nicm
b8bda67f30 Don't blindly increase offsets by the return value of snprintf, if there
wasn't enough space this will go off the end. Instead clamp to the
available space. Fixes crash reported by Julien Rebetez.
2014-04-11 19:35:54 +00:00
nicm
73c5a487c1 save-buffer needs to use O_TRUNC. 2014-04-07 10:32:16 +00:00
nicm
acef311fe3 Work out mouse scroll wheel effect when the mouse is first detected and
store it in struct mouse_event, reduce the scroll size the 3 but allow
shift to reduce it to 1 and meta and ctrl to multiply by 3 if the
terminal supports them, also support wheel in choose mode. From Marcel
Partap.
2014-04-03 08:20:29 +00:00
nicm
8824dae6f7 A couple of trivial mouse-related style nits. 2014-04-03 08:15:17 +00:00
nicm
252a7373d6 Support UTF-8 with choose-buffer, from Kosuke ASAMI. Also make
buffer_sample bigger to let it trim at window right edge.
2014-04-02 18:12:18 +00:00
nicm
82f3e0e9e6 Use the same logic for bell with and without visual-bell, from Filip
Moc.
2014-04-02 17:14:24 +00:00
nicm
8880bdb67c Do not replace ## with # in status_replace1 because it'll be done later
by the format code.
2014-04-02 17:08:23 +00:00
nicm
b52b40b2bc pane_start_path has gone away. 2014-04-02 07:55:09 +00:00
deraadt
d9960b2d4d missed commit matching log.c 2014-04-01 05:50:30 +00:00
nicm
3c06bec03f Don't crash with a zero-length argument to setb, from J Raynor. 2014-03-31 21:43:55 +00:00
nicm
ee19d304ff In four byte UTF-8 sequences, only three bits of the first byte should
be used. Fix from Koga Osamu.
2014-03-31 21:43:35 +00:00
nicm
48478ea0a9 Remove log_debug2 as well and simplify log.c. 2014-03-31 21:42:45 +00:00
nicm
7bdb675469 GRID_DEBUG is no longer needed. 2014-03-31 21:42:27 +00:00
nicm
f155316be7 Remove unused log functions. 2014-03-31 21:42:05 +00:00
nicm
dca7d1c0fd Make message-limit a server option. 2014-03-31 21:41:35 +00:00
nicm
1704d4a6b7 Don't segfaut when the parent of the layout cell is NULL, from Thomas Adam. 2014-03-31 21:41:07 +00:00
nicm
46593e7aa2 Add names for mouse button bits rather than using magic numbers, from
Marcel Partap.
2014-03-31 21:40:21 +00:00
nicm
fcdae6925a Use hex constants rather than shifts for mouse events and flags, pointed
out by Marcel Partap.
2014-03-31 21:39:59 +00:00
nicm
0e4d1d8493 Add setb -a to append and a copy mode append command, from J Raynor with
minor changes.
2014-03-31 21:39:31 +00:00
nicm
b11de5adc7 Make session_attached a count and add session_many_attached flag. 2014-03-31 21:37:55 +00:00