emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Highlight current line when using gud


From: Zhiwei Chen
Subject: Re: Highlight current line when using gud
Date: Wed, 30 Jun 2021 12:53:08 +0000


> On Jun 30, 2021, at 7:54 PM, Lars Ingebrigtsen <larsi@gnus.org> wrote:
> 
> 
> Condy Chen <condy0919@gmail.com> writes:
> 
>> Before this patch, dark theme users cannot distinguish the line from the
>> background even though hl-line-mode is enabled. Personally I can't.
> 
> I'm not sure I understand the problem here -- hl-line-mode works fine
> for me when using a dark background.

The problem can be categorized into 3 cases. See below.

> 
>> Furthermore, users must set hl-line-sticky-flag to t to enable
>> highlight in all windows or move the point to the source file buffer,
>> otherwise only the arrow in fringe is helpful for which line program
>> run to. It's too restricted in such a situation.
>> 
>> So I propose to add a new overlay of current line to make gud more
>> friendly and deprecate the old one.
> 
> The patch seems to add a new overlay mechanism for gud that's switched
> on for all people?  And is "the old one" you want to deprecate
> hl-line-mode?

Case 1: Users don't use hl-line-mode.
There will be no line highlighted in the source buffer.

Case 2: Users use `hl-line-mode' but set `hl-line-sticky-flag' to nil.
In that case, current line will be highlighted if and only if the point is in 
the source buffer. But if people type “n”, “bt”, “c” ... in the gud buffer, the 
line in the source buffer will not be highlighted due to the nil 
`hl-line-sticky-flag’.

Case 3: Users use `hl-line-mode’ and set `hl-line-sticky-flag’ to t.
It works well except that users should make sure `hl-line-face’ is 
distinguishable. For me (using doom-one theme), it’s hard to see the 
highlighted line.

It tries to improve the experience of gud in case 1 and case 2, and gives an 
another opportunity to customize. 

--
Zhiwei Chen


reply via email to

[Prev in Thread] Current Thread [Next in Thread]