[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to set background-color without damaging cut&paste ?
From: |
Eli Zaretskii |
Subject: |
Re: How to set background-color without damaging cut&paste ? |
Date: |
Wed, 04 Sep 2024 14:40:40 +0300 |
> Date: Wed, 4 Sep 2024 01:28:08 +0200
> From: Peter <pmc@citylink.dinoex.sub.org>
>
> Hi,
>
> I'm using xterm. I want to set the background to paperwhite.
>
> I tried this, but it makes cut&paste unuseable:
>
> (unless (display-graphic-p)
>
> (if (string-equal (getenv "TERM") "xterm-256color")
> (add-to-list 'default-frame-alist '(background-color . "brightwhite"))
> (add-to-list 'default-frame-alist '(background-color . "white")))
> )
>
>
> Then, given a file with this content:
>
> First Line
> Second Line
>
> Without the color setting, I can move the mouse over the first line,
> click thrice and hold to the second line; then middle-click into a
> hexdumper gives this:
>
> 00000000 46 69 72 73 74 20 4c 69 6e 65 0a 53 65 63 6f 6e |First Line.Secon|
> 00000010 64 20 4c 69 6e 65 0a |d Line.|
>
> However, after setting the background-color, the result is this:
>
> 00000000 46 69 72 73 74 20 4c 69 6e 65 20 20 20 20 20 20 |First Line |
> 00000010 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
> 00000020 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
> 00000030 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
> 00000040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
> 00000050 0a 53 65 63 6f 6e 64 20 4c 69 6e 65 20 20 20 20 |.Second Line |
> 00000060 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
> 00000070 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
> 00000080 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
> 00000090 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
> 000000a0 20 0a | .|
>
> It basically fills the remainder from eol to the window-border
> with spaces.
>
> Is there an other means to set the color?
I think it doesn't matter. What you seem to see is xterm's effort to
give you background-colored whitespace when the background is
different from the default colors. The mouse clicks are processed by
xterm in this case, not by Emacs.
IOW, I think this is a question for xterm developers.