Commit Graph

1391 Commits (90ae7682ed06557bd4d8deac9d9e48ecc7b38a07)

Author SHA1 Message Date
nicm 90ae7682ed Clear window->flags when clearing winlinks
When clearing WINLINK_ALERTFLAGS for all sessions, we must also, for
that window, clear the window->flags as well, otherwise sessions may
well still see flags for winlinks long since cleared.

This therefore introduces WINDOW_ALERTFLAGS to help with this.
2013-10-10 11:59:23 +00:00
nicm e6af0ad23e choose-tree: Reset top when toggling items
When choose-tree is told to expand/collapse items (especially when first
rendering collapsed to just show sessions), ensure that in addition to
setting the selected item, that the item itself appears on the bottom of
the screen, rather than off screen.

This was causing rendering glitches when a very small tmux window tried
to render a list of items in choose-tree much larger than itself, and
the selected item appeared off screen, and didn't show the selection
until the selection had wrapped around to the top of the screen.
2013-10-10 11:58:52 +00:00
nicm 34674bb180 Renumber windows: Lookup lastw via window not index
When calling 'movew -r' on a session to reorder the winlinks, ensure
when adding back in the information for the lastw stack that we look up
the winlink based on the window and not its index.

Using the index doesn't make sense here because when comparing it to the
old set, it will never match since the winlink has been renumbered.

Bug reported by Ben Boeckel. Patch by Thomas Adam.
2013-10-10 11:58:24 +00:00
nicm 784b711393 Assign mouse x/y coords before checking them. When receiving mouse
inputs, we should set the x/y coordinates earlier than we currently do,
so that we aren't off-by-one in the case when the statusbar is at the
top of the screen. By Thomas Adam.
2013-10-10 11:57:52 +00:00
nicm 81a548bcc4 Accept multiple parameters to SM/RM/DECSET/DECRST, based on a diff from
Hayaki Saito.
2013-10-10 11:57:14 +00:00
nicm fd1750af49 Add automatic-rename-format option allowing automatic rename to use
something other than pane_current_command.
2013-10-10 11:56:50 +00:00
nicm 2bf2f5d58e Allow nested format expansion. 2013-10-10 11:50:36 +00:00
nicm 40811eb8d4 Add length limit operator for formats. 2013-10-10 11:50:20 +00:00
nicm 2756d12750 Handle input mouse positions <33 (we already can generate them). 2013-10-10 11:49:42 +00:00
nicm 7839993fe7 Only include actual trailing spaces not unused cells with capturep -J,
from George Nachman.
2013-10-10 11:49:29 +00:00
nicm 47a4a9992c Allow the file descriptor received from the client to be -1. 2013-10-10 11:49:07 +00:00
nicm d75dd2ab1c Add formats for window flags. 2013-10-10 11:47:52 +00:00
nicm 6e665708fc Missing space in refresh-client synopsis. 2013-10-10 11:46:47 +00:00
nicm d3830e622f Grouped sessions were being leaked on destroy, correctly free them. 2013-10-10 11:46:28 +00:00
nicm 0538676aa3 Make recalculate_sizes() handle an empty window with no active
pane. This can happen when a window is in two sessions - it isn't
destroyed immediately when the pane goes away but is left until the last
session is destroyed. Fixes problems with grouped sessions reported by
Daniel Ralston.
2013-10-10 11:46:00 +00:00
nicm 4c9f41f1ad Pass flags into cmdq_guard as an argument since sometimes cmdq->cmd can
be NULL. Avoids crash when a command in a command client can't be
parsed.
2013-10-10 11:45:28 +00:00
nicm 7c71c3e27d Change the default for the default-path option to ~. This is a quick
change to turn off the KERN_PROC_CWD code which is unpredictable. Later
it will go away and there may be other changes to how this works.
2013-10-05 13:56:48 +00:00
nicm 9f330897a8 Fix previous not to leak fd on failure, whoops. 2013-10-05 10:40:49 +00:00
nicm 3d8a8ea0c6 Use open(".")/fchdir() to save and restore current directory rather than
getcwd()/chdir().
2013-10-05 08:12:39 +00:00
schwarze 304ea079d2 use .Mt for email addresses; from Jan Stary <hans at stare dot cz>; ok jmc@ 2013-07-16 00:07:52 +00:00
Nicholas Marriott a9ebb62d54 Make next-word-end work properly with vi(1) keys, reported by patrick
keshishian.
2013-07-12 09:52:36 +00:00
Nicholas Marriott f5b041e394 Add pane_synchronized format, from Romain Francoise. 2013-07-05 15:27:14 +00:00
Nicholas Marriott a96a8a1aab Clarify error messages when setting options, from Thomas Adam. 2013-07-05 15:10:38 +00:00
Nicholas Marriott 064124cc5f When the session option renumber-window is used, ensure we iterate over
all sessions in that group when the winlinks are reordered, otherwise
the winlink lists are out of sync with one another. From Thomas Adam.
2013-07-05 14:52:33 +00:00
Nicholas Marriott 7af5fec038 Whitespace nits, from Ben Boeckel. 2013-07-05 14:44:06 +00:00
Nicholas Marriott f884fff869 Implement s, S, C mode switch commands in vi(1) mode, from Ben Boeckel. 2013-07-05 14:38:23 +00:00
Nicholas Marriott 3977dba761 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.
2013-06-23 13:10:46 +00:00
Nicholas Marriott a41cd8d75b Always push a focus event when the application turns it on, prompted by
discussion with Hayaki Saito a while ago.
2013-06-23 12:51:28 +00:00
Nicholas Marriott 662d471215 Mark control commands specially so the client can identify them, based
on a diff from George Nachman a while back.
2013-06-23 12:41:54 +00:00
Stuart Henderson d6debc21c7 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.
2013-06-11 19:18:02 +00:00
Jason McIntyre ddb52a2b15 escape "Ss", becuase groff thinks it has found a macro; 2013-06-02 14:40:17 +00:00
Nicholas Marriott 13441e8cb8 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.
2013-06-02 07:52:15 +00:00
Nicholas Marriott c231381aa3 Demote the old single-character replacement variables (#S and friends)
to aliases of formats. From Tiago Cunha.
2013-05-31 19:56:05 +00:00
Nicholas Marriott c30d60f7ae Add host_short format, from Tiago Cunha. 2013-05-31 19:46:42 +00:00
Nicholas Marriott 9fb9f78e43 Use u_char for the send-keys string to avoid mangling top-bit-set
characters when they are promoted to int and passed to
window_pane_key. Reported by Jacob Bang.
2013-05-31 12:50:05 +00:00
Nicholas Marriott a0cf65db77 Instead of eating 1024 bytes or so for the arguments of each command,
save memory by using an RB tree. From Tiago Cunha.
2013-05-31 12:19:34 +00:00
Nicholas Marriott 88a4da9747 Don't let cursor position overflow when reflowing, from Christopher
Collins.
2013-05-15 15:39:51 +00:00
Nicholas Marriott 25c430b1cd Reserve space for \0 in cmd_print, from George Nachman. 2013-05-15 15:34:09 +00:00
Nicholas Marriott 772d61f3ed RIS should reset focus reporting, from Hayaki Saito. 2013-05-15 15:32:14 +00:00
Nicholas Marriott 66f4c60a84 Don't limit width and height to 222 in standard mouse mode. 2013-05-07 11:00:16 +00:00
Nicholas Marriott 2555ac58cc .Op Fl b not .Fl b for run-shell synopsis, from Ben Boeckel. 2013-04-24 10:15:47 +00:00
Nicholas Marriott e323101ede Rename global configuration define. 2013-04-24 10:01:32 +00:00
Nicholas Marriott 3d2b7d5bce When using choose-tree -u, start with the current window
highlighted. From Thomas Adam.
2013-04-22 22:17:29 +00:00
Nicholas Marriott 04f54ab38f Get session of -t window rather than client's window. 2013-04-22 16:34:53 +00:00
Nicholas Marriott 46c7dbef0f Call recalculate_sizes() after killing window in case it is in a grouped
session, from Daniel Ralston.
2013-04-22 13:35:18 +00:00
Nicholas Marriott d89b35e682 Use lockf which is more portable than flock, from Dagobert Michelsen. 2013-04-22 08:42:19 +00:00
Nicholas Marriott 5dda1abc32 Don't let server_client_check_focus use a dead bufferevent, from Romain
Francoise.
2013-04-21 21:32:00 +00:00
Theo Deraadt 55640a31b3 (long long) and %lld for time_t output
ok nicm
2013-04-17 14:52:31 +00:00
Nicholas Marriott 88428cff3a %zu format for size_t. 2013-04-17 08:41:41 +00:00
Nicholas Marriott 27dcf470dc Remove some Korean characters from the zero-width list that apparently
shouldn't be there, from Jeong Mok Cho.
2013-04-12 12:50:36 +00:00