On 10/15/06, Beni Cherniavsky <[EMAIL PROTECTED]> wrote:
> On 09/10/06, Axel Liljencrantz <[EMAIL PROTECTED]> wrote:
> > * When selecting wrapped text with the mouse, the 'wrapping
> > characters' are also copied. It would be cool if they could be made to
> > magically disapear, as Beni suggested might be possible. Note that
> > other programs, like emacs, don't do this, which implies it's
> > non-trivial.
> >
> That's not what I meant.  If you want to display the
> wrapping-indicator ellipsis, there is no way to omit from
> copy-and-paste.  One of the motivations given for displaying the
> wrapping indicator chars was to mark the place where the newline has
> to be removed after copy-and -paste.  What I meant was that if you
> don't show any wrapping chars and do the wrapping by printing over the
> end of the line (instead of moving the cursor), the new-line should be
> automagically omitted by the terminal.  Of course, this only helps if
> you also give up the spaces that align to the prompt.

Ah, I understand. Unfortunatly, it seems that allowing the terminal to
wrap itself makes cursor movement unpredictable. Sometimes moving
up/down the wrapped line is seen as one line, sometimes as two.

I will try to see if there is any method to this madness, if so then
the added benefit of working wrapped selections is probably bigger
than the drawback of not having ellipsis characters to show that the
line is wrapped.

>
> If you want to go real fancy, you might try to take control over the
> mouse and simlate cut-and-paste by highlighting the dragged region
> yourself -- and copying the right text to the X buffer by yourself.
> For example, nano can do that in recent versions (but it doesn't
> undestand dragging, you need two clicks).  Anyway, I really don't
> think you want to mess with that.

That would be really cool. I'm not sure it's possible, though, since
fish doesn't know what line it is on. Or maybe the mouse extension can
also be used to get the location of the cursor?

>
> But it does point at a neat solution(?): stop caring about properly
> copying with the terminal, since one can always copy (even to the X
> clipboard) with a fish editing command!  C-a C-k C-y does that;
> perhaps we want an easier key for copying to clipboard.

You could bind that sequence to a single key if you wanted to. Adding
something like

"\M-c": beginning-of-line; kill-line; yank

to fish_inputrc should work. I hope.

>
> > * When resizing a terminal with wrapped commands, the terminal becomes
> > full of giberish. This seems nearly impossible to avoid, since at
> > least on some terminals, the cursor movement commands become
> > unreliable when dealing with text that has been automatically wrapped
> > by the terminal as a result of resizing. Even worse moving the cursor
> > upwards seems to sometimes move text upwards as well, as if the
> > terminal was somehow trying to 'unwrap' the text as a result of the
> > cursor movement. I'm not sure this is solveable, curses-based programs
> > simply cop out by repainting the entire screen. Fish doesn't have that
> > luxury, since we want to preserve the output of previous commands.
> >
> Perhaps fish could repaint the line(s) with the command only.  I saw
> programs that do that quite reliably but I don't remember which.

I tried. The problem is that if I try to move the cursor up to the
beginning of the command, somehow parts of the prompt will move with
the cursor and overwrite things above the beginning of the command.
It's kind of hard to describe, but the effect was a bit like the
smudge tool in graphics editing programs like the Gimp.

I've learned almost everything I know about terminal programming
through trial and error, so it's quite possible that there's a special
mode or something you can enter to make the terminal behave itself in
these situations, but I've been unable to get downsizing the terminal
to look good when there are wrapped lines.

Curses-based programs don't have this problem since they can just
repaint the entire screen.

>
> Yep, terminals are messy :-(...

Oh, yes...

>
> --
> Beni Cherniavsky <[EMAIL PROTECTED]>, who can only read email on weekends.
>


-- 
Axel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to