Re: [PATCH] choose-tree: use line-drawing characters if possible

2012-09-05 Thread Romain Francoise
Nicholas Marriott writes: >> > Although I am a little inclined to instead add #[acs] #[noacs] and make >> > it use screen_write_cnputs so people can use #[format] stuff which might >> > be nice for choose-list. Wouldn't be so nice if you have a window called >> > #[foo] though... so maybe not. >>

Re: [PATCH] choose-tree: use line-drawing characters if possible

2012-09-05 Thread Nicholas Marriott
On Wed, Sep 05, 2012 at 10:49:47PM +0200, Romain Francoise wrote: > Nicholas Marriott writes: > > > Sorry I didn't really give you many clear clues here - we actually need > > to make it pass some code through so the final write is done with the > > charset bit set. How about something like the d

Re: [PATCH] choose-tree: use line-drawing characters if possible

2012-09-05 Thread Romain Francoise
Nicholas Marriott writes: > Sorry I didn't really give you many clear clues here - we actually need > to make it pass some code through so the final write is done with the > charset bit set. How about something like the diff below? Ah yes, very nice. It takes care of the acsc and utf-8 modes in

Re: [PATCH] choose-tree: use line-drawing characters if possible

2012-09-05 Thread Nicholas Marriott
Hi Sorry I didn't really give you many clear clues here - we actually need to make it pass some code through so the final write is done with the charset bit set. How about something like the diff below? Although I am a little inclined to instead add #[acs] #[noacs] and make it use screen_write_cn

Re: [PATCH] choose-tree: use line-drawing characters if possible

2012-09-05 Thread Romain Francoise
Nicholas Marriott writes: > Don't think I want to use UTF-8 arrows unless the ACS arrows will work > too. Ok. Conceptually we just have to use smacs/rmacs around the codes when writing to the terminal and it should work, right? I tried the naive approach below and the escape sequences are not in

Re: [PATCH 1/1] choose-list: Don't segfault on empty list

2012-09-05 Thread Thomas Adam
Hi, On 5 September 2012 11:04, Nicholas Marriott wrote: > This looks wrong - the first item now has index (u_int)-1? Yeah -- wasn't thinking properly. -- Thomas Adam -- Live Security Virtual Conference Exclusive live e

Re: [PATCH 1/1] choose-list: Don't segfault on empty list

2012-09-05 Thread Nicholas Marriott
This looks wrong - the first item now has index (u_int)-1? idx will still be 0 if there was nothing added, so why not just this? Index: cmd-choose-list.c === RCS file: /cvs/src/usr.bin/tmux/cmd-choose-list.c,v retrieving revision 1.2

Re: if-shell and default-shell

2012-09-05 Thread Chris Johnsen
On Tue, Sep 4, 2012 at 6:02 PM, Samer Atiani wrote: > I have the following line in my .tmux.conf: > > if-shell 'test `uname` == "Darwin"' 'set-option -g default-command > "reattach-to-user-namespace -l zsh"' ... > However, this seems to only take effect > on the second window created in tmux, not

[PATCH 1/1] choose-list: Don't segfault on empty list

2012-09-05 Thread Thomas Adam
Even though we skip empty entries separated with commas when we're looking at each item, an input such as: choose-list -l ,, would still mean we go on to display a blank line, resulting in a segfault as there's no data associated with that entry. --- cmd-choose-list.c | 15 --- 1

Re: [PATCH 0/4] Add choose-list command

2012-09-05 Thread Thomas Adam
On Mon, Sep 03, 2012 at 11:03:10AM +0100, Nicholas Marriott wrote: > Hi > > Applied with a few tweaks - when something is const char * it means it > shouldn't be changed, even by strsep :-). So I made it copy it first. Heh; yes, OK. I was being lazy. :) > Is anything else going to use add_item

if-shell and default-shell

2012-09-05 Thread Samer Atiani
I have the following line in my .tmux.conf: if-shell 'test `uname` == "Darwin"' 'set-option -g default-command "reattach-to-user-namespace -l zsh"' Which is designed to make tmux wrap zsh with reattach-to-user-namespace (see more about it here: https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboa

Re: Custom layout using select-layout

2012-09-05 Thread Nicholas Marriott
You are probably running tmux select-layout from the shell and not quoting the layout string so the shell is expanding it. Put single quotes around it. On Mon, Sep 03, 2012 at 05:30:11PM -0400, Yubin Kim wrote: > Hello, > > In the Windows and Panes section of the tmux man page, you can find > t

Re: [PATCH 0/4] Add choose-list command

2012-09-05 Thread Nicholas Marriott
Hi Applied with a few tweaks - when something is const char * it means it shouldn't be changed, even by strsep :-). So I made it copy it first. Is anything else going to use add_item function? On Sat, Jul 21, 2012 at 11:24:49AM +0100, Thomas Adam wrote: > Hi, > > This adds a choose-list comman

Re: Possible bug with libevent-2.0.20

2012-09-05 Thread Nicholas Marriott
Hi Applied without the macro. struct tty is memset in tty_init so the event should be zero (and if it wasn't, libevent 1.4 would fail too anyway). Thanks On Wed, Aug 29, 2012 at 02:24:09PM +0100, Thomas Adam wrote: > Hi, > > On 29 August 2012 13:21, Nicholas Marriott > wrote: > > Hi > > > >

Re: [PATCH] Make choose-* use reverse video for WINLINK_ALERTS

2012-09-05 Thread Nicholas Marriott
Hi I don't like reverse because it is easy to confuse with the selected line on a quick look. If people have turned off bold isn't that their own fault? :-) On Fri, Aug 31, 2012 at 09:48:29PM +0100, Thomas Adam wrote: > Some fonts and terminals can be configured to not show bold fonts (XTerm,

Re: Any way to choose which pane is on top when using split-window?

2012-09-05 Thread Nicholas Marriott
Hi I could have sworn someone had done this before but I guess if it was done it was never committed. Anyway you could do something like: bind h splitw -dvl7 'exec htop'\; swapw -U On Tue, Sep 04, 2012 at 04:42:23PM +0200, J??r??mie Roquet wrote: > Hi everyone, > > I have the following in my

Re: Tmux unexpectedly crashed

2012-09-05 Thread Nicholas Marriott
Hi Hmm. I see anything wrong, can you let me know if it happens again? On Thu, Aug 16, 2012 at 08:04:30PM -0700, John Magolske wrote: > * Nicholas Marriott [120816 06:35]: > > Can you reproduce this problem? > > I was not able to reproduce this. At the time of the crash I had this > in my ~/.z

Re: [PATCH] client: defer reading stdin until requested

2012-09-05 Thread Nicholas Marriott
Hi I realized we could reuse MSG_STDIN from the other direction and not need a protocol bump (breaking old client with new server is ok just not vice versa). So this is in now with that change, Thanks On Tue, May 29, 2012 at 12:07:50AM -0500, Chris Johnsen wrote: > OpenBSD patchset 1114 (pass

Re: [PATCH] choose-tree: use line-drawing characters if possible

2012-09-05 Thread Nicholas Marriott
Hi I took the non-UTF-8 bits of this but changed it to " |->" and " \->". Don't think I want to use UTF-8 arrows unless the ACS arrows will work too. Thanks On Mon, Aug 13, 2012 at 07:37:28PM +0200, Romain Francoise wrote: > Nicholas Marriott writes: > > > The problem is that you need to turn

Re: using tmux buffers to do a pane search

2012-09-05 Thread Nicholas Marriott
It would not be a big code change to make the a key add the top paste buffer to the search string in the same way as C-y works in the command prompt. On Fri, Aug 31, 2012 at 01:16:08PM -0700, Edward Peschko wrote: > hello all, > > Screen has a very useful ability that would be great to have in t