Root cause:
When font is changed paintEvent is called and we draw text "Mq" to
calculate font height. Then on next paintEvent we draw original content.
Since it's done in 2 steps we get flickering.
Fix:
Do calculating and redrawing in 1 step.
KP_Clear is mapped from numpad 5 on non-Apple keyboards according to Qt
doc [1]. It's mapped from KP_Begin from XKB on X11.
Tests: with numlock off,
numpad 5 => "\e[OE"
Ctrl + numpad 5 => "\e[1;5E"
Alt + numpad 5 => "\e[1;3E"
Shift + numpad 5 => "5"
These results are the same as VTE3 0.56.3. On xterm 346, Shift + numpad
5 generates "\eO2u". However, Qt returns 5 instead of KP_Clear if Shift
is hold even with numlock off, so implementing Shift + numpad 5 might be
rather complicated. As a side note, shifted keypad sequences can be
found in emacs sources [2].
Note that on Wayfire (wlroots-based Wayland compositor), numpad 5 with
numlock off generates an event without Qt::KeypadModifier. Further
investigation needed.
Ref: https://github.com/lxqt/qtermwidget/issues/117
[1] https://doc.qt.io/qt-5/qt.html#Key-enum
[2] https://github.com/emacs-mirror/emacs/blame/master/lisp/term/xterm.el
With this patch, non-color sequences using colons are also accepted. I
consider such sequences undefined behavior, though.
Closes https://github.com/lxqt/qterminal/issues/78
Transient scrollbars don't take space but that wasn't considered in a small part of the code. This patch completes https://github.com/lxqt/qtermwidget/commit/2b7c2b38edd69613f5c1ec67958c18f438d27e4f
I encountered a small problem during a big compilation (qt), made and applied the patch and, by chance, had another big compilation (qtcreator) afterward. The test was successful, as expected.
Qt does not support fontconfig on macOS, so we need to work around it and
provide a "real" font family name for the default font. Otherwise, "Monospace"
will be unrecognized and it will fall back to a variable-width font.
* fix local variable will be copied despite being returned by name
error when building with clang 7
* Fix error return-std-move
std::move should not be used here because
it prevents RVO (copy elision) and it's
considered an anti-pattern.
To fix the original warning the returned
type must match the declared return
type or copy elision will not be possible
(and the warning will be triggered).
* Update ColorScheme.cpp
Fixes https://github.com/lxqt/qtermwidget/issues/1
Notes about other terminals:
Konsole:
^? for backspace and ^H for ctrl+backspace
Gnome Terminal (VTE3):
- ^? for backspace and ^H for ctrl+backspace by default, and
- ^H for backspace and ^? for ctrl+backspace if the option
"Backspace key generates:" is set to "Control-H"