Summary: | Wrong rendering at the end of line when drawing colored whitespaces | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Igor Kostromin <elwood.su> |
Component: | emulation | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | elwood.su, muxa.su |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
URL: | http://gyazo.com/775c9ec8cc81861ff40e62d7350be512 | ||
Latest Commit: | http://commits.kde.org/konsole/c7b9435d65c4c1324eadc71e66bae2ca78e6dd7a | Version Fixed In: | 2.13 |
Sentry Crash Report: |
Description
Igor Kostromin
2014-01-20 16:51:30 UTC
Also reproduced on Debian 7 (Konsole 2.8.4) http://gyazo.com/e7ad5b49a52803d4276f8fd0887feff5 - but black characters at the end of line instead of white. Color of parasite blocks depends on color scheme selected in Konsole's profile. After several days of investigation, I have found the source of a problem. If width > 80, ncurses for this line generates sequence of control codes with text, this sequence rerenders it 100%. But when width < 80, ncurses (optimized?) generates sequence of control codes without any text, but with "DEL" control code. Konsole deletes one character, and at end of line it filled with empty flags. XTerm and another terms handle it otherwise: they fill end of line using space with attributes which are set now (see ClearCells func at screen.c file in xterm sources - view https://gist.github.com/elw00d/8890166). If comment ClearCells call in ScrnDeleteChar func implementation, bug will be "reproduced" in xterm too. Proposed patch: https://gist.github.com/anonymous/8890021 I didn't code on C/C++ for several years, and I don't sure that creating anonymous Character object is good in this place, so fix my code, please, if it is buggy from memory consistency point of view. Thanks for the work and patch - it does appear to fix you test - let me look at it further. I think this will work + // Append space(s) with current attributes + Character spaceWithCurrentAttrs(' ', _effectiveForeground, _effectiveBackground, + _effectiveRendition, false); + + for (int i = 0; i < n; i++) + _screenLines[_cuY].append(spaceWithCurrentAttrs); Yes, it works for me - for test program and for original mono application. Git commit 427de88cc1020c7fb9fb2b8752fddfd4cc0be736 by Kurt Hindenburg. Committed on 09/02/2014 at 16:02. Pushed by hindenburg into branch 'master'. Fix wrong rendering at the end of line when drawing colored whitespaces Previous code just deleted the end characters; new code puts in spaces with current attributes at the end of the line. Thanks to Igor Kostromin elwood.su@gmail.com for bug, research + patch See bko for test code + more info FIXED-IN: 2.13 M +8 -0 src/Screen.cpp http://commits.kde.org/konsole/427de88cc1020c7fb9fb2b8752fddfd4cc0be736 Thanks ! Git commit 3d9c101877290f8d4fffc83b364d7bad6e4c9653 by Kurt Hindenburg. Committed on 09/02/2014 at 16:02. Pushed by hindenburg into branch 'frameworks'. Fix wrong rendering at the end of line when drawing colored whitespaces Previous code just deleted the end characters; new code puts in spaces with current attributes at the end of the line. Thanks to Igor Kostromin elwood.su@gmail.com for bug, research + patch See bko for test code + more info FIXED-IN: 2.13 (cherry picked from commit 427de88cc1020c7fb9fb2b8752fddfd4cc0be736) M +8 -0 src/Screen.cpp http://commits.kde.org/konsole/3d9c101877290f8d4fffc83b364d7bad6e4c9653 Git commit c7b9435d65c4c1324eadc71e66bae2ca78e6dd7a by Kurt Hindenburg. Committed on 09/02/2014 at 16:02. Pushed by hindenburg into branch 'KDE/4.12'. Fix wrong rendering at the end of line when drawing colored whitespaces Previous code just deleted the end characters; new code puts in spaces with current attributes at the end of the line. Thanks to Igor Kostromin elwood.su@gmail.com for bug, research + patch See bko for test code + more info FIXED-IN: 2.13 (cherry picked from commit 427de88cc1020c7fb9fb2b8752fddfd4cc0be736) M +8 -0 src/Screen.cpp http://commits.kde.org/konsole/c7b9435d65c4c1324eadc71e66bae2ca78e6dd7a |