slang-users mailing list

[2002 Date Index] [2002 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Cut and paste adds spaces after line ends


Hello!

GNU Midnight Commander includes an old version of S-Lang (0.99.38 with 
minor fixes) as a replacement library used when S-Lang is not installed.

The only complaint about the old library is that copying text to the X
clipboard converts empty space past the line ends into spaces.  I tried to
backport support for "background color erase", but it's quite a big
change, so I gave up for now.

Maybe it's possible to fill space right of the line ends with binary
zeroes or somehow let rxvt (and other terminals) know that the spaces in
that area don't need to be copied to the clipboard?

Anyway, this patch is a side effect of wasting my time on this issue.  I'm 
almost sure that it should be Del_Eol_Str, since "\033[K" is the default 
value for Del_Eol_Str.

=======================
--- src/sldisply.c
+++ src/sldisply.c
@@ -2215,7 +2215,7 @@ int SLtt_initialize (char *term)
    if (is_xterm && (Del_Bol_Str == NULL))
      Del_Bol_Str = "\033[1K";
    if (is_xterm && (Del_Eol_Str == NULL))
-     Del_Bol_Str = "\033[K";
+     Del_Eol_Str = "\033[K";
 
    Rev_Vid_Str = SLtt_tgetstr("mr");
    if (Rev_Vid_Str == NULL) Rev_Vid_Str = SLtt_tgetstr("so");
=======================

Also please look at this comment in src/sldisply.c:

   /* Avoid writing to the lower right corner.  If the terminal does not                            
    * have Del_Eol_Str, then it probably does not have what it takes to play                        
    * games with insert for for a space into that corner.                                           
    */                                                                                              

"for for" sounds wrong, but I cannot rewrite this comment myself because I 
don't understand it.  It doesn't parse properly :-)

-- 
Regards,
Pavel Roskin


[2002 date index] [2002 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]