Re: tmux loadb and fifos

2010-02-18 Thread Fulvio Ciriaco
Yes, this is quite a more linear patch. It has one defect, in my opinion, i.e. that it does buffer-size reallocations, usually this is avoided by increasing the buffer by a factor 2 rather than increasing it by 1 byte. That amounts to changing --

[Patch] Typing end-of-line twice

2010-02-18 Thread Micah Cowan
Change (inspired by an IRC discussion with Nicholas): Typing the end-of-line key once will bring you to the end of the textual content of the current row on the screen. If the current row contains only a portion of a line had wrapped onto the next row, then typing the end-of-line key again will br

[Patch] Re: copy rectangle with short lines

2010-02-18 Thread Micah Cowan
clemens fischer wrote: > Hi, > > I am very glad that tmux has rectangular copies now! But a problem as > well: in the following, try to cut out the block > > >bbb < from >aaa bbb > >y< >xxx y > >22 < >111 22 > > At least in vi-copy mode on linux, the shor

Re: tmux loadb and fifos

2010-02-18 Thread Nicholas Marriott
Hi Thanks for the diff. Tiago Cunha who originally wrote the load-buffer command sent me an update to do this as well which is quite similar to yours but a bit simpler, so we will probably use it. I've attached it below as well if you want to take a look. You can't just use stdin because the loa

Re: copy rectangle with short lines

2010-02-18 Thread Robin Lee Powell
On Thu, Feb 18, 2010 at 11:05:27PM +, Nicholas Marriott wrote: > On Thu, Feb 18, 2010 at 02:59:44PM -0800, Robin Lee Powell wrote: > > I'm lost; what options would it rotate through, exactly, and how > > would that be determined? > > Eg mode-keys has options "vi" and "emacs", "setw mode-keys"

Re: copy rectangle with short lines

2010-02-18 Thread Nicholas Marriott
On Thu, Feb 18, 2010 at 02:59:44PM -0800, Robin Lee Powell wrote: > On Thu, Feb 18, 2010 at 10:51:06PM +, Nicholas Marriott wrote: > > On Thu, Feb 18, 2010 at 02:36:06PM -0800, Robin Lee Powell wrote: > > > On Thu, Feb 18, 2010 at 02:25:08PM -0800, Micah Cowan wrote: > > > > > Now we just need

Re: copy rectangle with short lines

2010-02-18 Thread Nicholas Marriott
Ah okay, I thought he was talking about something used from copy-mode. On Thu, Feb 18, 2010 at 02:57:51PM -0800, Robin Lee Powell wrote: > Isn't that what Micah's solution does? If not, I'm missing > something. > > -Robin > > On Thu, Feb 18, 2010 at 10:52:01PM +, Nicholas Marriott wrote: >

Re: copy rectangle with short lines

2010-02-18 Thread Robin Lee Powell
On Thu, Feb 18, 2010 at 10:51:06PM +, Nicholas Marriott wrote: > On Thu, Feb 18, 2010 at 02:36:06PM -0800, Robin Lee Powell wrote: > > On Thu, Feb 18, 2010 at 02:25:08PM -0800, Micah Cowan wrote: > > > > Now we just need the rotating behaviour of J (see my other > > > > post). > > > > > > Well

Re: copy rectangle with short lines

2010-02-18 Thread Robin Lee Powell
Isn't that what Micah's solution does? If not, I'm missing something. -Robin On Thu, Feb 18, 2010 at 10:52:01PM +, Nicholas Marriott wrote: > > I think the place for deciding how things should appear when they are pasted > is > in paste-buffer or save-buffer not in copy mode. > > > On Th

Re: copy rectangle with short lines

2010-02-18 Thread Nicholas Marriott
On Thu, Feb 18, 2010 at 01:39:15PM -0800, Micah Cowan wrote: > clemens fischer wrote: > > Hi, > > > > I am very glad that tmux has rectangular copies now! But a problem as > > well: in the following, try to cut out the block > > > > >bbb < from >aaa bbb > > >y< >xxx y

Re: copy rectangle with short lines

2010-02-18 Thread Nicholas Marriott
Hi I think the place for deciding how things should appear when they are pasted is in paste-buffer or save-buffer not in copy mode. On Thu, Feb 18, 2010 at 02:25:08PM -0800, Micah Cowan wrote: > Robin Lee Powell wrote: > > On Thu, Feb 18, 2010 at 01:39:15PM -0800, Micah Cowan wrote: > >> The fol

Re: copy rectangle with short lines

2010-02-18 Thread Nicholas Marriott
Hi On Thu, Feb 18, 2010 at 02:36:06PM -0800, Robin Lee Powell wrote: > On Thu, Feb 18, 2010 at 02:25:08PM -0800, Micah Cowan wrote: > > > Now we just need the rotating behaviour of J (see my other > > > post). > > > > Well, you could of course still rig that up through run-shell, and > > some sor

Re: copy rectangle with short lines

2010-02-18 Thread Robin Lee Powell
On Thu, Feb 18, 2010 at 02:25:08PM -0800, Micah Cowan wrote: > > Now we just need the rotating behaviour of J (see my other > > post). > > Well, you could of course still rig that up through run-shell, and > some sort of flag-file. But personally, I don't like the rotating > behavior of J: better

Re: copy rectangle with short lines

2010-02-18 Thread Micah Cowan
clemens fischer wrote: > clemens fischer wrote: > >> I am very glad that tmux has rectangular copies now! But a problem as >> well: in the following, try to cut out the block >> >> >bbb < from >aaa bbb >> >y< >xxx y >> >22 < >111 22 >> >> At least in vi-copy m

Re: copy rectangle with short lines

2010-02-18 Thread Micah Cowan
Robin Lee Powell wrote: > On Thu, Feb 18, 2010 at 01:39:15PM -0800, Micah Cowan wrote: >> The following should bind J to join the current (already >> finished) selection with spaces: >> >> bind-key J run-shell 'tmux save-buffer /tmp/.tmux-exchange; tr \n >> " " < /tmp/.tmux-exchange >/tmp/.tmux-ex

Re: copy rectangle with short lines

2010-02-18 Thread Robin Lee Powell
On Thu, Feb 18, 2010 at 01:39:15PM -0800, Micah Cowan wrote: > The following should bind J to join the current (already > finished) selection with spaces: > > bind-key J run-shell 'tmux save-buffer /tmp/.tmux-exchange; tr \n > " " < /tmp/.tmux-exchange >/tmp/.tmux-exchange-processed; tmux > load-

Re: copy rectangle with short lines

2010-02-18 Thread Robin Lee Powell
On Thu, Feb 18, 2010 at 09:07:00PM +0100, clemens fischer wrote: > The other problem: for my purposes, I used to rely on screens > ability to 'J'oin the lines of any selection by either spaces, > commas, newlines (the default) or whatnot, ie. to make one long > line of the selected lines. For exa

Re: copy rectangle with short lines

2010-02-18 Thread clemens fischer
clemens fischer wrote: > I am very glad that tmux has rectangular copies now! But a problem as > well: in the following, try to cut out the block > > >bbb < from >aaa bbb > >y< >xxx y > >22 < >111 22 > > At least in vi-copy mode on linux, the shortest line d

Re: copy rectangle with short lines

2010-02-18 Thread Micah Cowan
clemens fischer wrote: > Hi, > > I am very glad that tmux has rectangular copies now! But a problem as > well: in the following, try to cut out the block > > >bbb < from >aaa bbb > >y< >xxx y > >22 < >111 22 > > At least in vi-copy mode on linux, the shor

Re: tmux loadb and fifos

2010-02-18 Thread Fulvio Ciriaco
Hallo, please find enclosed a patch to tmux cmd-load-buffer.c which reads the buffer from undecidable size streams up to EOF. I put a predefined limit on the final buffer size. This, I checked on my currently available machines: netBSD and Linux and works fine. Also, I wrote code to read from pipe

copy rectangle with short lines

2010-02-18 Thread clemens fischer
Hi, I am very glad that tmux has rectangular copies now! But a problem as well: in the following, try to cut out the block >bbb < from >aaa bbb >y< >xxx y >22 < >111 22 At least in vi-copy mode on linux, the shortest line determines the right border of th