Re: [PATCH] Allow custom key tables for e.g. multiple keystroke bindings.

2014-05-13 Thread Nicholas Marriott
On Mon, May 12, 2014 at 10:09:53PM -0700, Keith Amling wrote: > > There should be no need for a prefix key anymore. Instead, the default > > root table should have a binding for C-b to change the key table. > > > > That way the prefix table is not special, the only special table is the > > root ta

Re: patch for named buffers

2014-05-13 Thread Nicholas Marriott
Hi Applied now, although I don't see a need for a default key binding to paste a named buffer so I left that out - it's easy for people to bind it themselves. Also I'm iffy on whether we really need a key to append to a buffer in copy mode. If we do I think I'd rather it was a separate prompt (so

Re: use "--" to mark start of command w/ neww etc to avoid quoting

2014-05-13 Thread Nicholas Marriott
Also applied this, thanks! On Thu, May 08, 2014 at 08:03:08PM -0500, J Raynor wrote: > I've attached a patch that just updates the man page. If this patch > is acceptable, let me know if you would like this combined with the > patch for the code into a single patch. > > On Thu, May 8, 2014 at 2

idea: avoid mode-mouse crash using lazyredraw

2014-05-13 Thread Suraj Kurapati
Hello, I'm weary of mode-mouse because it has caused tmux to crash on several occasions. I think mouse-mode crashes tmux because of its frantic redrawing of the screen (to highlight the current state of text selection) because Vim 7.4's approach to mouse-based text selection (where the selected r

Re: idea: avoid mode-mouse crash using lazyredraw

2014-05-13 Thread Suraj Kurapati
On Tue, May 13, 2014 at 10:46 AM, Benoit Pierre wrote: > You mean left click on selection start, right click on selection > end? Because otherwise it works like tmux when holding and > dragging with the left mouse button. No, I meant the latter: holding and dragging with left mouse button. > I w

Re: idea: avoid mode-mouse crash using lazyredraw

2014-05-13 Thread Thomas Adam
On 13 May 2014 18:33, Suraj Kurapati wrote: > Hello, > > I'm weary of mode-mouse because it has caused tmux to crash on several > occasions. I think mouse-mode crashes tmux because of its frantic > redrawing of the screen (to highlight the current state of text I wouldn't speculate; that's just

Re: idea: avoid mode-mouse crash using lazyredraw

2014-05-13 Thread Suraj Kurapati
On Tue, May 13, 2014 at 10:55 AM, Thomas Adam wrote: > On 13 May 2014 18:33, Suraj Kurapati wrote: >> I think mouse-mode crashes tmux because of its frantic redrawing >> of the screen (to highlight the current state of text > > I wouldn't speculate; that's just causing FUD and red-herrings. Sorry

[PATCH] setb: Check for existing named paste buffer

2014-05-13 Thread Thomas Adam
With the recent ability to name paste buffers, the following is possible: % ~/projects/tmux/tmux setb -b buffer0001 -nfoo % ~/projects/tmux/tmux setb -b buffer -nbuffer0001 % ~/projects/tmux/tmux setb -b foo -nbuffer0001 Which results in two paste buffers with the same name. Perfectly legal

Re: [PATCH] Allow custom key tables for e.g. multiple keystroke bindings.

2014-05-13 Thread Nicholas Marriott
Hi On Tue, May 13, 2014 at 01:41:07PM -0700, Keith Amling wrote: > The various things I didn't quote are all straight-forward and will be > my pleasure to fix. > > > I don't think it'd be that much compatibility code. > > > > We could just maintain a flag for the "option-set" prefix in the root

Re: [PATCH] Allow custom key tables for e.g. multiple keystroke bindings.

2014-05-13 Thread Nicholas Marriott
On Tue, May 13, 2014 at 03:42:05PM -0700, Keith Amling wrote: > > > Well, I agree it needs to be destroyed eventually but the issue is that > > > if a user thinks of the client as being set to [read from] a keytable > > > with a name then they will likely think binding a key into a keytable of > >

Re: [PATCH] setb: Check for existing named paste buffer

2014-05-13 Thread Nicholas Marriott
Whoops, applied, thanks. On Tue, May 13, 2014 at 10:55:58PM +0100, Thomas Adam wrote: > With the recent ability to name paste buffers, the following is possible: > > % ~/projects/tmux/tmux setb -b buffer0001 -nfoo > % ~/projects/tmux/tmux setb -b buffer -nbuffer0001 > % ~/projects/tmux/tmux

[PATCH 1/3] Remove dead_key_bindings.

2014-05-13 Thread Keith Amling
Keith --- key-bindings.c | 17 ++--- server.c | 1 - tmux.h | 1 - 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/key-bindings.c b/key-bindings.c index f725508bce62..58be0c6fe896 100644 --- a/key-bindings.c +++ b/key-bindings.c @@ -27,7 +27,6 @@ RB_GE

[PATCH 2/3] Rename "key table" to "mode key table" in some places.

2014-05-13 Thread Keith Amling
Keith --- cmd-bind-key.c | 8 cmd-unbind-key.c | 8 tmux.1 | 8 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmd-bind-key.c b/cmd-bind-key.c index 4ff3ac8431bc..27a03ce11ad7 100644 --- a/cmd-bind-key.c +++ b/cmd-bind-key.c @@ -29,12 +29,1

[PATCH 3/3] Allow custom key tables for e.g. multiple keystroke bindings.

2014-05-13 Thread Keith Amling
Keith --- cmd-bind-key.c | 44 +++-- cmd-list-keys.c | 80 +++--- cmd-switch-client.c | 16 +- cmd-unbind-key.c| 27 +++ format.c| 3 +- key-bindings.c | 137 +--- s

[PATCH 3b/3] Allow custom key tables for e.g. multiple keystroke bindings.

2014-05-13 Thread Keith Amling
To my great shame that last patch (3 of 3) was very wrong (and undertested). This should be less wrong and maybe a little less confused in e.g. unbinding. Keith --- cmd-bind-key.c | 44 +++-- cmd-list-keys.c | 80 +++--- cmd-switch-client.c | 16

[PATCH 1/3] Simplify line copying.

2014-05-13 Thread Keith Amling
I was confused by this complex block for a few moments before managing to parse "rest start x", "last end x", etc. This may or may not help the next reader of this code but I think it's undoubtedly simpler. Keith --- window-copy.c | 16 1 file changed, 4 insertions(+), 12 delet

[PATCH 2/3] Copy mode commands left-prune and right-prune to match screen's c and C.

2014-05-13 Thread Keith Amling
This is mostly straight-forward although it feels like there are a lot of layers to push it through. Also, I have no idea what's appropriate [if anything] to bind this to in emacs copy mode. Keith --- mode-key.c| 4 screen.c | 12 ++- tmux.h| 7 ++- window-co

[PATCH 3/3] Copy mode command change-joinmode to match screen's J.

2014-05-13 Thread Keith Amling
This patch is less clear than the preceding two. First, should this be bound to anything by default? 'J' is already taken in vi-copy. Second, the current way of surfacing the current join mode is the best thing I could think of but it's sort of ugly and space-wasting. Screen just shows a tempor

Re: [PATCH 1/3] Remove dead_key_bindings.

2014-05-13 Thread Nicholas Marriott
Applied this one to OpenBSD now, will be in SF after the next sync. Thanks On Tue, May 13, 2014 at 04:25:41PM -0700, Keith Amling wrote: > Keith > > --- > key-bindings.c | 17 ++--- > server.c | 1 - > tmux.h | 1 - > 3 files changed, 2 insertions(+), 17 deletions(-

Re: [PATCH 2/3] Copy mode commands left-prune and right-prune to match screen's c and C.

2014-05-13 Thread Nicholas Marriott
What do these do? On Tue, May 13, 2014 at 08:54:49PM -0700, Keith Amling wrote: > This is mostly straight-forward although it feels like there are a lot > of layers to push it through. Also, I have no idea what's appropriate > [if anything] to bind this to in emacs copy mode. > > Keith > >

Re: [PATCH 3/3] Copy mode command change-joinmode to match screen's J.

2014-05-13 Thread Nicholas Marriott
Hi You can already join the lines on paste with the -s flag to paste-buffer. I wouldn't do this at all but if there is a good case for it, I would just prefer a copy-with-separator command which prompted for the separator (like the prompt we just added for buffer name). On Tue, May 13, 2014 at

Re: [PATCH 1/3] Simplify line copying.

2014-05-13 Thread Nicholas Marriott
Applied, thanks. On Tue, May 13, 2014 at 08:50:56PM -0700, Keith Amling wrote: > I was confused by this complex block for a few moments before managing > to parse "rest start x", "last end x", etc. This may or may not help > the next reader of this code but I think it's undoubtedly simpler. >

Re: [PATCH 2/3] Rename "key table" to "mode key table" in some places.

2014-05-13 Thread Nicholas Marriott
I applied this but changed mode-key-table just to mode-table which is enough in the places they are used.. On Tue, May 13, 2014 at 04:26:44PM -0700, Keith Amling wrote: > Keith > > --- > cmd-bind-key.c | 8 > cmd-unbind-key.c | 8 > tmux.1 | 8 > 3 files c