It is sufficiently a rarity that it is more likely that people get
confused by unexpected zmodem terminal codes than the handful of users actually expecting them.
See also: https://bugs.debian.org/1119976
GUI:
The autosave functionality is contained in a SaveHistoryAutoTask
class, which inherits from SessionTask. The autosave mechanism
hinges on two pieces of information regarding the autosave file:
the number of bytes used to store the contents of dropped lines
(represented by SaveHistoryAutoTask::_droppedBytes) and a list
of byte offsets corresponding to the start of the contents of lines
on the screen (represented by SaveHistoryAutoTask::_bytesLines).
Everytime a line is dropped, SaveHistoryAutoTask::_droppedBytes
is updated using _bytesLines. Everytime the output is read and
saved to file, the autosave file is resized to _droppedBytes and
the current screen output is appended. Everytime the output is read
or the screen is resized, _bytesLines is updated.
The autosave can be started using an "Auto Save Ouput As" button in
the "File" tab of the toolbar. Once the autosave is started, said
button is replaced by a "Stop Auto Save" button which allows the
user to stop the autosave. Internally, any errors encountered by
the program would result in an KMessageBox reporting the details of
the error and stopping the autosave as well. Clicking on the stop
button reveals the start button again.
Similar to SaveHistoryTask, there is a file dialog which allows the
user to choose which file they would like the autosave contents to
be stored in.
Apart from errors involving reading session output and writing to
file, modifying the file externally, renaming the file and deleting
the file will also result in an error. Emulation::_currentScreen
being changed will also result in an error.
The autosave is conducted at a fixed time interval, apart from an
edge case where an autosave is required immediately due to internal
constraints. Said fixed time interval can be set by the user in the
settings of their current profile, specifically the "Advanced" tab.
Details on the internals of the autosave functionality is documented
in the source files.
GUI
FEATURE: 208620
* speeds up incremental builds as changes to a header will not always
need the full mocs_compilation.cpp for all the target's headers rebuild,
while having a moc file sourced into a source file only adds minor
extra costs, due to small own code and the used headers usually
already covered by the source file, being for the same class/struct
* seems to not slow down clean builds, due to empty mocs_compilation.cpp
resulting in those quickly processed, while the minor extra cost of the
sourced moc files does not outweigh that in summary.
Measured times actually improved by some percent points.
(ideally CMake would just skip empty mocs_compilation.cpp & its object
file one day)
* enables compiler to see all methods of a class in same compilation unit
to do some sanity checks
* potentially more inlining in general, due to more in the compilation unit
* allows to keep using more forward declarations in the header, as with the
moc code being sourced into the cpp file there definitions can be ensured
and often are already for the needs of the normal class methods
Regression introduced by 5919c1fd. The selection range is inclusive in
both ends.
Thanks to Chiitoo for reporting and to Yerrey Dev for proposing a
solution.
BUG: 448144
Every time the selection is changed, the selection text is retrieved to
check whether to enable or disable the copy actions. Besides that, the
selection text is also used for the web search context menu entries.
Better just check if the selection is empty and make a note that the
selection changed, so the next time the context menu is invoked it can
retrieve the current selection text, which should happen much less often
than selection changes.
No functional change.
Instead of sending one char at a time through a virtual function, send
all at once and process them in a loop inside the function. The perf
improvement is not that big from this (+100ms), but it lays down path
for more possible optimizations
_currentTerminalDisplay was not set until some interaction was made with
the TerminalDisplay widget. Set it as soon as Session->addView() is
called.
BUG: 439529
- If the QObject has a parent, the parent will take care of deleting it
- Use std::unique_ptr to manage pointer member variable
- Use '= default' with empty destructors
- Fix initialization of QTimer in constructor initialization list
Good explanation from Tomaz (he's better with words than me):
I think he wants to quick swap the text from primary and secondary screens:
ls folder
vim somefile.txt
- mmm, what's the name of the file I need, I just did the LS for that reason -
peek into primary screen, note the file name, go back to secondary screen
Merge request:
https://invent.kde.org/utilities/konsole/-/merge_requests/210
Replaces single-value session state with separate flags for each
possible notification (silence, activity, bell). This will allow for
more flexible control over how specific notifications are displayed.
Summary:
Previously the logic was to set "usesMouse" (Emulation
MODE_Mouse100{0,1,2,3}) to false to indicate that the program running
in the terminal supports handling mouse events itself, i.e. the program
is interested in receiving Mouse Tracking events; or set to true otherwise.
Since this was confusing, use the inverse logic by replacing "usesMouse"
with "usesMouseTracking".
"usesMouseTracking" is set to true when the program running in the shell
indicates it's interested in receiving Mouse Tracking events. Or false
otherwise.
For example, vim indicates it's interested in receiving Mouse Tracking
evnets when using visual mouse mode:
http://vimdoc.sourceforge.net/htmldoc/intro.html#Normal
Mouse Tracking is an XTerm extension, for more information examine:
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
Test Plan:
Before:
- Execute `printf '\e[?1003h'` to enable mouse tracking mode in konsole, now when you move the mouse events will be sent to the terminal when you move, click, drag the mouse
- Pressing and holding the Shift key should let the mouse act as normal
- Open a new tab or execute `printf 'e[?1003l'`, then open any file in vim, `:set mouse=a` then select some text with the mouse, note that VISUAL is displayed at the bottom of the window; right clicking _doesn't_ show the context menu as you'd expecte
- Pressing and holding the Shift key should let the mouse act as normal
Apply the diff, build, and try again, everything should work as before.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D13134
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
Instead of using a hardcoded delay and hope that the signals are handled
in the right order just use a direct connection for the first signal so
we can guarantee that it is handled before the execution continues to
the emission of the second signal.
REVIEW: 127724
Allow xterm's bracketed paste mode to work
When enabled by '\e[?2004h', pasted data is surrounded by \e[200~ and
\e[201~. This is mainly for text editors to temporarily switch off
autoindent and line wrapping.
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
This page have a .vimrc that will trigger this
https://bugzilla.gnome.org/show_bug.cgi?id=605299
Thanks to Egmont Koblinger for patch
BUG: 324946
FEATURE: 4.13
(cherry picked from commit 8082bcd2ef)
TerminalDisplayAccessible is disabled for Qt5 currently since I don't
have any experience with accessible stuff and it is more complicated
than just changing a few includes
REVIEW: 111937