Use an Enum for the DECSCUSR cursor styles
AbandonedPublic

Authored by ahmadsamir on Apr 27 2018, 7:54 PM.

Details

Reviewers
hindenburg
Group Reviewers
Konsole
Summary

Use an Enum for the cursor styles which basically combines cursor shape
and blinking status.

This is in preparation for an upcoming patch to add support for DECRQSS
(Request Status String) escape sequences, which will use the cursor
styles in more than one location in the code.

Test Plan

Make sure the DECSCUSR escape sequences still work as before:
printf '\e[ q' #blinking block
printf '\e[0 q' # blinking block
printf '\e[1 q' # blinking block
printf '\e[2 q' # steady block
printf '\e[3 q' # blinking underscore
printf '\e[4 q' # steady underscore
printf '\e[5 q' # blinking ibeam/bar
printf '\e[6 q' # steady ibeam/bar

Executing reset in terminal will reset the cursor shape and blinking
settings to the current profile values.

Diff Detail

Repository
R319 Konsole
Branch
cursor-style-enum
Lint
No Linters Available
Unit
No Unit Test Coverage
ahmadsamir created this revision.Apr 27 2018, 7:54 PM
Restricted Application added a project: Konsole. · View Herald TranscriptApr 27 2018, 7:54 PM
ahmadsamir requested review of this revision.Apr 27 2018, 7:54 PM
ahmadsamir updated this revision to Diff 33218.
ahmadsamir edited the test plan for this revision. (Show Details)

Tweak Test Plan section formatting

ahmadsamir abandoned this revision.Apr 30 2018, 6:01 PM

Disregard this review request; Implementing DECRQSS is taking me too long (for so little gain), due to it having a an \e character at the end.

I think maybe konsole could add a KONSOLE_VERSION env var, so that apps like neovim can filter on that when checking certain capabilities[1].

[1]https://github.com/neovim/neovim/issues/8300