Bug 484836 - Background color of whitespace characters changed by scrolling
Summary: Background color of whitespace characters changed by scrolling
Status: REPORTED
Alias: None
Product: konsole
Classification: Applications
Component: emulation (show other bugs)
Version: unspecified
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-31 20:24 UTC by mpeter.68m0y
Modified: 2024-03-31 20:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
steps to reproduce in images (361.37 KB, image/png)
2024-03-31 20:24 UTC, mpeter.68m0y
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mpeter.68m0y 2024-03-31 20:24:18 UTC
Created attachment 167999 [details]
steps to reproduce in images

Konsole version: 24.04.70
Source: gitlab CI release with name 'konsole-master-2985-windows-cl-msvc2022-x86_64'

SUMMARY
If I scroll a larger amount (like with Page Up/Down, or in vim with with '50 Ctrl+e'), the background color of multiple lines will be applied a specific color.
The same happens if I scroll up after scrolling down, but sometimes it is also happening if I just scroll down one line at a time.

So far I have only noticed this in vim, independently of whether it syntax colors the file or not.

STEPS TO REPRODUCE
1. Find a file which is large enough that you can scroll it (example file below)
2. Open this file in vim
a)
3. Scroll more than 1 line at once
b)
3. scroll down by pressing the down arrow on the keyboard
4. scroll back with the up arrow

I have also included an image with screenshots to help understand what is happening.

The following is a file with which I can reproduce the problem, but any file should do: https://invent.kde.org/utilities/konsole/-/blob/ac11bc83b450196eb942e7b377b506fe332b7696/src/Application.cpp

OBSERVED RESULT
The background color of lines have changed

EXPECTED RESULT
The background colors stay unchanged

SOFTWARE/OS VERSIONS
Windows: 10
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
It appears that it does not matter whether vim uses colored text in the file or not, the background color of blanks will change on scrolling regardless of that.

The `less` command with the same file does not reproduce this problem.

While experiencing the problem in vim, I have found 2 ways that temporarly fix the background colors of lines in the current view:
- resizing the terminal pane, or the whole window if the tab only has 1 pane
- using the "Visual Line" selection mode, if I go over with my cursor all the affected lines twice (by moving the cursor so that the lines are selected and then not anymore), it fixes up their background color. Some lines are fixed up the first time they are reached, but some only partly.

It seems the incorrect background color of blanks is always the normal variant of the "Color 3" color of the current color scheme. Changing the color scheme changes the blanks' color to the appropriate color of the new color scheme.
Comment 1 mpeter.68m0y 2024-03-31 20:46:15 UTC
One more thing I forgot to mention: the issue does not happen when using the Windows Terminal terminal emulator.