Bug 418519 - Konsole not processing ANSI codes for next line, previous line
Summary: Konsole not processing ANSI codes for next line, previous line
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: emulation (show other bugs)
Version: 19.12.2
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-05 23:29 UTC by Joey Rockhold
Modified: 2020-07-06 14:15 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joey Rockhold 2020-03-05 23:29:35 UTC
SUMMARY

ANSI code CSI n E means to go down n lines, then go to the beginning of that line.

ANSI code CSI n F means to go up n lines, then go to the beginning of that line.

Konsole is not handling these ANSI codes properly (or at all).  I have tested with Gnome terminal and xterm, and they work as expected, so I believe this is a Konsole-specific issue.


STEPS TO REPRODUCE

Run this 2 line bash script:

clear;echo -e "\n\n\n\n\n";
echo -e "Second line\e[1FFirst line\e[2EThird Line\n\n"


OBSERVED RESULT

Second lineFirst lineThird Line

EXPECTED RESULT

First line
Second line
Third Line

SOFTWARE/OS VERSIONS
KDE Neon 5.18 Updated as of 2020-03-04

Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.18.2
KDE Frameworks Version: 5.67.0
Qt Version: 5.14.1

ADDITIONAL INFORMATION

ANSI code specifications I am going from: https://en.wikipedia.org/wiki/ANSI_escape_code

There are other more detailed sites, but I find this one easy to read.
Comment 1 Luis Alves 2020-07-04 20:21:00 UTC
Git commit 66c830484c3e042284b23114ab51f99a706cea9e by Luis Alves.
Committed on 04/07/2020 at 20:12.
Pushed by hindenburg into branch 'master'.

Add new ANSI sequences CNL and CPL

- It implements Cursor Next Line (CNL) sequence.
- It implments Cursor Previous Line (CPL) sequence.
- Ex: echo -e "Hello\e[3EWorld" or echo -e "Hello\e[3FWorld"
FIXED-IN: 20.08

https://invent.kde.org/utilities/konsole/-/merge_requests/116

M  +31   -0    src/Screen.cpp
M  +10   -0    src/Screen.h
M  +3    -3    src/Vt102Emulation.cpp

https://invent.kde.org/utilities/konsole/commit/66c830484c3e042284b23114ab51f99a706cea9e