_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
Traditionally konsole only was able to parse OSC sequences terminated with
non-standard BEL. In 324d78c07f konsole was extended to parse sequences
terminated by 7-bit ST (ESC \) as well. But the OSC responses were still
hardcoded to reply only with sequences with BEL. But replying to 7-bit ST
terminated sequences with a reply terminated by a non-standard terminator
is wrong.
This commit passes the terminator along and changes the response to match
the original request.
printf "\033]10;?\a" replies with "^[]10;rgb:fcfc/fcfc/fcfc^G"
printf "\033]10;?\033\\" replies with "^[]10;rgb:fcfc/fcfc/fcfc^[\"
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.
Focused TerminalDisplay is used as a source of tab and window name,
for activity monitoring, splits headers highlighting, etc.
With this change TerminalDisplay is considered focused even when actual
focus is e.g. in its search box or popup menu.
Summary:
Session:setUserTitle() changes various attributes of the current
session/tab, not just the title; change the name from "Title" to
"sessionAttribute" as that's more representative of what the function
does. Propagate the change where appropriate throughout the code.
Remove Vt102Emulation::requestWindowAttribute(), as it's not used
anywhere.
Update a couple of links to Qt and XTerm documentation, respectively.
Test Plan:
Every thing should work as before, for example changing the window title:
- "Show window title on the titlebar" must be enabled
- unset PROMPT_COMMAND (in case it already sets the window title)
- Change the window title:
`printf "\033]2;%s\007" "testing"`
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D13147
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
Summary:
This mimics the XTerm Alternate Scroll Mode 1007
The h (set), l (reset), s (save), r (restore) modes depend on the profile
setting Mouse->Enable Alternate Screen buffer scrolling.
Depends on D12139
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D12140
vim uses control sequence 'echo -e "\033]11;?\a"' to request real
background color -- to detect whether terminal has dark or light
background.
Thanks to Pavel Raiskup praiskup redhat com
REVIEW: 125333
BUG: 352945
FIXED-IN: 15.12
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)
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
It is decided to not reimplement this feature in KDE4 konsole:
* It is non-trivial work to implement it correctly
* It annoyed some users when it was available in KDE3 konsole
* Not many users want this feature back
This is a follow up of commit cee0ce539b
CCBUG:172271
REVIEW:104156
Whenever TeminalDisplay is resized, konsole tells the underlying
pty device its new size by calling Pty::setWindowSize(). However,
current code can't guarantee when the terminal process starts and
queries the pty device about its size, the pty device already has the
right info. This has caused some long known bugs, such as #176902.
This patch tries to guarantee that important assumption. It currently
uses a hard-coded small delay, which works pretty well in practice
although not that elegant.
Patch by Jekyll Wu <adaptee@gmail.com>
I think this is better than leaving the situation as it is. This may
be backported if no issues are found.
BUG: 173999
BUG: 176902
BUG: 203185
BUG: 229058
REVIEW: 102061
FIXED-IN: 4.8