There are plenty of bugs here, this is a *serious* wip.
This is also the biggest feature that is missing from konsole for
years and years.
todo:
- Handle history
- Handle increase of columns in terminal size
- handle new lines
Some improvements in calculations and safeguards when changing
cursor position, using defined value in Vt102Emulation.cpp to
protect the integers.
Added cursor position tests to ScreenTest.
Vt102Emulation MAX_ARGUMENT calculation wasn't correct, it was
sending an argument bigger than max argument.
When highlightScrolledLines is set to display the Konsole new window
will open with the display profile terminal size columns - 1.
Now it will check the options and correct the Konsole size to display
all columns set in profile terminal size.
BUG: 429600
5bc0b561c4 changed ColorEntry from a
wrapper around QColor to a typedef. Before that change, the wrapper
needed to exist and have its color property set to the new color.
Now, there is no reason to access the old color at all. Entirely
remove the vestigial code.
Signed-off-by: Antonio Russo <aerusso@aerusso.net>
The terminal display mouse tracking is based on character boxes, i.e.,
unless the mouse moves out of a character box its position hasn't really
changed. So most of the logic in `TerminalDisplay::mouseMoveEvent` can
be skipped/omitted till the pointer crosses box boundaries.
Before my changes applications like Vim/Neovim couldn't do selection via
dragging with the left mouse button (there might be a bug there). I
cursorily checked other features like the color filter and URL
underlining, and they work.
The code commented with `nowrap!` has no use: `_cuX` and `_cuY` get
updated to this value on image resize. This code also appeared in
functions unrelated to horizontal wrapping.
I also took the liberty to update the conditions which determine whether
to use "default values". Before, the conditions only checked for zero
instead of (invalid) negative numbers (maybe a few Q_ASSERT's are
desired here?).
commit b84c0f49 replaced the previous hack, clearly failing to notice
that in-thread qobject conections are direct by default. we need to make
the competing connection queued instead.
this remains a hack; a proper solution would be avoiding the instant
resize by skipping the initialization to 80x25, but i'm not going to
touch any of that mess.
BUG: 412598