- 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"
BUG: 418519
FIXED-IN: 20.08
https://invent.kde.org/utilities/konsole/-/merge_requests/116
'Konsole::Screen` defined an array of 1024 elements, where user
may resize the konsole to have more columns than this array can handle.
Selecting a row in such case, is going to cause a buffer-overflow.
Bug: 330066
Before we opened a link via mousePress but if we want to make a
selection that will open a file and drag.
Now we check if there is a selection before trying to open something.
So if you click and drag a url, it will not open. If you directly
click and release without dragging, it will open.
FIXED-IN: 20.08
https://invent.kde.org/utilities/konsole/-/merge_requests/9
Summary:
This behavior is present in e.g. xterm and linux console.
Currently when using CSI 2J escape sequence, screen contents are
appended to scrollback (including bottom empty lines). This is breaking
`clear` command, which replaces scrollback with current screen contents.
BUG: 384218
Test Plan:
* Start Konsole with a shell
* `clear`
**Expected result:**
Cleared display, empty scrollback.
**Actual result:**
Cleared display, but scrollback contains previous display contents.
---
* Start Konsole with a shell
* seq 1000
* `echo -ne '\033[2J`
**Expected result:**
Cleared display, numbers in last scrollback lines.
**Actual result:**
Cleared display, but scrollback contains previous display contents
(i.e. shell prompt in last lines)
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D21282
Summary:
Replaces direct konsole_wcwidth() calls with Character object property
and the class static function, which internally still use
konsole_wcwidth().
The change also prepares the codebase for a new code for determining
character width. This way the change will barely touch existing code.
CCBUG: 396435
Test Plan:
konsole_wcwidth() is still used, just in one central place. Passed
compilation and CharacterWidthTest should be enough.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D15756
Summary:
When there was at least one search attempt, search box is still opened,
and the screen and/or history is cleared, there is a high chance that
the line number remembered by the search is invalid. The line number is
used as the lines array index, so this can lead to overflow and crash.
This is at this moment fixed with a check in `copyLineToStream()`, which
is a generic function that happens to be used by search function and
where the line number is used. There still is an `assert` which is
triggered in debug builds.
The patch moves the check directly to a search function, where the line
number is initialized before first search.
Test Plan:
You have to do the test in debug build - there is a hack in
`copyLineToStream()` which prevents crash, but `assert` before it
catches an error condition.
* Run `seq 5000`
* Open search box, search for `000`
* Clear screen/history
* Search up/down
Actual result: Crash
Expected result: Search should begin from last/first visible line
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D14106
Summary:
Currently Unicode uses 0x10FFFF code points. It is possible to represent
all of them with up to two 16 bit values (UTF-16), but this makes it
harder to e.g. check for their width.
Some test cases were changed. Originally they were added with an
assumption that the code point will be truncated to 16 bit value and
as a result changed to another code point.
Test Plan:
* All code points <= 0xFFFF should work as before
* Start the same tmux session in two Konsoles
* Change background to fully transparent in one of them and put it in
front of the other one, so that all text will overlap
* Generate characters with (you can pipe it to `fold -s | less -r`):
```
perl -XCSDL -e 'print map{chr($_), " "} 1..0xffff'
```
* Compare output visually.
* Code points > 0xFFFF should not be truncated to 16 bits
* "𝐀" and "퐀" should be different characters
* Some code points > 0xFFFF should have single width
* Vertical lines below should align:
```
|𝐀 |
|𠀋|
```
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: konsole-devel, hindenburg, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D12236
Summary:
Until now, the cursor was moved from last column to the next column
outside the screen. Since screen array is linear, it partially worked
like it was on the beginning of a next line (as long as it was not the
last line).
Test Plan:
* Run `cat > /dev/null` (shells do their own line wrapping, so will
not work)
* Move cursor to terminal's last visible line using enter
* Move cursor to terminal's last visible column by typing something
* Type one more character
Expected result: new line should appear with the cursor on the beginning
Actual result: cursor disappears, no new line
* Turn on blinking cursor
* Run `cat > /dev/null`
* Move cursor to terminal's last visible column by typing something
* Type one more character
Expected result: the cursor should move to new line's first column
and blink
Actual result: the cursor "moves" but does not blink
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: konsole-devel, hindenburg, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D12554
Summary:
The lines are resized when something is put in them. Resizing them
here filled them with spaces (default value), later those trailing
spaces were put into history, and eventually into saved output or
clipboard (because it is assumed lines in history do not contain
trailing spaces).
BUG: 392419
Test Plan:
* Enable "Trim trailing spaces" in Profile Settings → Mouse
* Set window size to about 100x100px
* Clear terminal (Ctrl-Shift-K by default)
* Run:
```
seq $(( $(tput lines) * 2 )); \
printf '*** resize ***'; read -s; printf '\n'; \
seq $(( $(tput lines) * 2 ))
```
* When "resize" show up, resize the window to about 500x500px
* Press enter
* Select and copy lines below `*** resize ***`
* Paste it in a text editor which allows to show trailing spaces
Expected result: lines should not contain trailing spaces
Actual result: lines added when resizing the window have trailing spaces
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D11893
Patch by btown using lxde/qtermwidget@60221da by @yan12125
ECMA-48 8.3.103 describes the sequence CSI Pn b for repeating the
previous character in the data stream. This sequence has been present
in XTerm since January 1997 and has been added to the latest terminfo
entry for xterm-new and derived entries such as xterm-256color.
https://phabricator.kde.org/D10064
This seems to be the limit in all the test files I've been trying.
Without this we get an issue with too many combining characters where
Konsole will eventually just hang.
REVIEW: 129874
For our own sanity we (falsely) assume that all surrogate characters are
double width, otherwise we have to go back and reflow the line.
This makes it work better with emojis in vim at least.
REVIEW: 129841
cursorRight() does not resize the _screenLines vector, leading to an
assert in QVector when trying to look up the _cuX which is bigger than
the amount of characters in the current line.
BUG: 372530
(cherry picked from commit 80b9e0775e)
cursorRight() does not resize the _screenLines vector, leading to an
assert in QVector when trying to look up the _cuX which is bigger than
the amount of characters in the current line.
BUG: 372530
Adds faint intensity, strikeout, conceal and overline support.
echo -e 'D\e[2mD\e[9mD\e[53mD\e[8mD'
Thanks to Antonio Russo antonio e russo gmail com for patch
REVIEW: 128405
BUG: 362171
(cherry picked from commit 84b43dfb21)
Adds faint intensity, strikeout, conceal and overline support.
echo -e 'D\e[2mD\e[9mD\e[53mD\e[8mD'
Thanks to Antonio Russo antonio e russo gmail com for patch
REVIEW: 128405
BUG: 362171
Reset was always called with clearScreen = true, so no point in having
that variable. We can probably also remove Screen::clear() and
Screen::home(), they're not used anymore, and weren't really useful
before this either.
We still preserve the scrollback history when resetting, which is not
what other terminal emulators do (http://stackoverflow.com/a/5367075),
but we do have a separate action for it, so I think it is a nice extra
feature to preserve it.
REVIEW: 128389
When looking backwards to combine into a character, it didn't take into
account characters with two column width. It also assumed that all
characters that needed to be combined were in the Mn unicode character
category, while the Hangul starting consonants are in the Lo category.
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
BUG: 330214
FIXED-IN: 2.13
(cherry picked from commit 427de88cc1)
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
BUG: 330214
FIXED-IN: 2.13
A lot of crashes in copyLineToStream _screenLines[screenLine]; this
likely needs to be a container, for now add an extra variable to watch
the size.
I still can't reproduce it though a lot of people can doing various
things.
319888, 313711, 312006, 306939, 304837