Bug 449698 - Highlight changed and unsaved lines markers not updated correctly on pressing ctrl-s
Summary: Highlight changed and unsaved lines markers not updated correctly on pressing...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: 21.12.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-06 14:02 UTC by Richard Ullger
Modified: 2024-04-18 17:21 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screen recording showing the issue (541.27 KB, video/x-matroska)
2023-01-10 22:44 UTC, Richard Ullger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Ullger 2022-02-06 14:02:16 UTC
SUMMARY
After editing some lines, pressing ctrl-s to save the file does not update the 'Left side' markers to green for all edited lines

STEPS TO REPRODUCE
1. Ensure Settings->Configure kate->Appearance->Borders->Highlight changed and unsaved lines is checked.
2. Create a dummy text file containing some lines of text in a directory where you do not have write permission, for example /etc using sudo.
3. Navigate to the directory in dolphin, right-click the file and select open with kate.
4. Make changes to some of the lines leaving the cursor on the last line edited.
5. Press ctrl-s to save the file entering your password when prompted.

OBSERVED RESULT
The red left side markers for the changed lines turn to green only for the lines on and below the line the cursor is on.

EXPECTED RESULT
The red left side markers for all changed lines should turn to green.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.23.90
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.5-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 12 × Intel® Core™ i7-8700 CPU @ 3.20GHz
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1080/PCIe/SSE2

ADDITIONAL INFORMATION
The issue only presents itself after entering your password.
The issue is not present if you have write access to the file and are not prompted to enter a password.
Moving the cursor in any direction with the arrow keys causes the remaining red markers to turn green.
Moving the mouse pointer to the left side that contains a line number causes the remaining red markers to turn green.
Comment 1 Thomas Surrel 2023-01-10 14:15:49 UTC
I cannot reproduce the issue by following the steps described, the problem seems to be fixed. Tested with KDE Plasma 5.26.5, Frameworks 5.101.0, KDE Gear 22.12.1. I am marking this bug as resolved.
Comment 2 Richard Ullger 2023-01-10 22:22:17 UTC
I have retested this following the steps described and the issue still exists.

Operating System: Arch Linux
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.101.0
kde-applications: 22.12.1
Qt Version: 5.15.8
Kernel Version: 6.1.4-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 12 × Intel® Core™ i7-8700 CPU @ 3.20GHz
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1080/PCIe/SSE2
Manufacturer: Notebook
Product Name: P7xxTM1
System Version: Not Applicable
Comment 3 Richard Ullger 2023-01-10 22:44:15 UTC
Created attachment 155193 [details]
Screen recording showing the issue
Comment 4 Thomas Surrel 2023-01-11 08:45:49 UTC
Weird, I can consistently _not_ reproduce the behavior you see ... And we are running the same versions:
Operating System: Arch Linux
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.8
Kernel Version: 6.1.4-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i7-7500U CPU @ 2.70GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 620
Manufacturer: LENOVO
Product Name: 20HF004MMX
System Version: ThinkPad T470s
Comment 5 Richard Ullger 2023-01-11 17:47:44 UTC
Are you leaving the cursor at the second edited line?

If I position the cursor at the end of the file before entering the password, both markers remain red. 
If I position the cursor at the start of the file before entering the password, both markers turn green.
If I leave the mouse pointer in the area containing the line numbers before entering the password, as soon as I move the mouse pointer out of that area, the markers turn green.

I can make further screen recordings to illustrate the different scenarios if you wish.
Comment 6 Richard Ullger 2024-04-18 17:21:02 UTC
This is now working in kate 24.02.2

Operating System: Arch Linux 
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.8.6-arch1-1 (64-bit)
Graphics Platform: X11