notepad-plus-plus / notepad-plus-plus/notepad-plus-plus

Highlighting the background of current line messes up syntax highlighting

Open
#13,779 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
29.4k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

The Highlight Background option of the Current-Line Indicator is very nice. But it currently messes up syntax highlighting (for example User-Defined Language) in a weird, avoidable way: While the foreground color is kept as-is, the background color gets substituted, resulting in an unplanned combination of foreground color and background color.

It seems better to keep the background color that the syntax highlighting wants, and let the Current-Line Indicator highlight only the background of characters for which the syntax highlighting defines a "Transparent" background.

The background color of syntax highlighting can be super important, also for accessibility.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with Current-Line Indicator's Highlight Background option and a User-Defined Language that assigns background colors, then trace the current-line rendering and syntax-background handling. Done means syntax-defined non-transparent backgrounds remain unchanged while the indicator highlights only characters with transparent backgrounds, including the reported accessibility behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.