On Mon, 12 May 2008 01:15:41 -0700
Gautam Iyer <[EMAIL PROTECTED]> wrote:
> On Mon, May 12, 2008 at 03:54:34PM +1000, Eduard Westra wrote:
>
> > When I select a text and the last character is a " " (i.e. a space)
> > it is not copied to the clipboard. When a printable character is
> > behind it, then it's copied to the clipboard, but if a newline
> > follows, the space is not copied, newline is! This is very annoying
> > if one needs an *exact* copy of the selected text (which is
> > something I use all the time!).
>
> Hmm. I don't think this is easily fixable. From the way the data is
> stored, we have no way of differentiating between the output of the
> following two commands
>
> echo "a "
> echo "a"
>
> This will take a bit of work to fix, and we welcome patches :).
Ummm. Interesting. I get this issue too, and found it slightly
annoying.
Just having a look, in src/screen.c are several define calls in line
5029:
void
rxvt_selection_make( ...
#ifdef DONT_SELECT_TRAILING_SPACES
STRIP_TRAILING_SPACE(str, new_selection_text);
#endif
which expand earlier in this file (line 144) to:
#ifdef DONT_SELECT_TRAILING_SPACES
# define STRIP_TRAILING_SPACE(str, fence) \
while (str > fence && ' ' == str[-1]) \
str --;
#endif
Sooo, looking, in src/feature.h line 526 is (which I have changed
here!!)
/* Strip trailing spaces from selection */
/* define DONT_SELECT_TRAILING_SPACES */
#undef DONT_SELECT_TRAILING_SPACES
...and this now appears to work OK for me :-) I haven't a clue if it's
the right thing to do, but it only appears to affect the 'selection' at
the time.
find . -name \* -exec grep -Hn "DONT_SELECT_TRAILING_SPACES" {} \;
./src/feature.h:526:/* define DONT_SELECT_TRAILING_SPACES */
./src/feature.h:527:#undef DONT_SELECT_TRAILING_SPACES
./src/screen.c:144:#ifdef DONT_SELECT_TRAILING_SPACES
./src/screen.c:5122:#ifdef DONT_SELECT_TRAILING_SPACES
./src/screen.c:5171:#ifdef DONT_SELECT_TRAILING_SPACES
Nick
--
Free Software Foundation Associate Member 5508
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Materm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/materm-devel
mrxvt home page: http://materm.sourceforge.net