[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to set background-color without damaging cut&paste ?
From: |
Peter |
Subject: |
Re: How to set background-color without damaging cut&paste ? |
Date: |
Wed, 4 Sep 2024 16:33:20 +0200 |
On Wed, Sep 04, 2024 at 07:41:02PM +0700, Yuri Khan wrote:
! You’re getting the default mouse selection handling by your terminal
! emulator, which is not guaranteed to be correct for full-screen
! applications.
I think I figured it out a bit further.
Syntax higlighting in C:
/* bla bla <line is filled with spaces>
* <line is filled with spaces>
*/ <line is correctly terminated!>
main() <line is correctly terminated!>
{ <line is correctly terminated!>
} <line is correctly terminated!>
So what is the difference with the first two lines? They are comments
- and comments do not end until end-of-line!
The third line is different, it is also a comment, but it ends - and
therefore it is copied correctly!
Somebody inside emacs did not bother to tell the curses library
where these comments do actually end. Because it seems irrelevant, as
anything subsequent on these lines will still be a comment.
The curses library, however, is a honest servant and tells the very
same to the X cutbuffer: this line doesn't end.
And the cutbuffer then does what it is supposed to do: collect all
the trailing spaces and add them to the line.
I might assume something similar is done with the background-color
setting: just not telling curses that (and where!) this line has an
end.
So, for now I refrain from setting background-color, and also set
(global-font-lock-mode 0)
which, I assume, should disable the entire color magic and get
us back to the good old times of monochrome screens.
But I would greatly appreciate if we could get this fixed.