This will allow % in URLs; also sync test code with actual code.
Previously the tests were using toUtf8(); however fromPercentEncoding
seems better.
BUG: 420791
Differential Revision: https://phabricator.kde.org/D29322
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.
The actions are destroyed during a focusIn / focusOut, and recreated
with the same content but different memory positions, and that
killed the QActions inside of the menu.
To trigger this is simple, open the search bar, type some url in
konsole, and right click on it: you will not see the actions
to copy and go to url.
moving the related code to QSharedPointer fixes this by delaying
the destruction of the pointer untill the menu is closed.
Summary:
Konsole already responds to background color status report
requests, but ignores requests for the foreground color.
This adds the support and makes Konsole behave like other xterm /
VTE-based terminals.
Test Plan:
Run 'printf "\033]10;?\a"' in a bash shell and Konsole should
respond with the current foreground color setting on stdout.
This reverts commit f96deb39aa.
This was anti-optimization.
QStringLiteral is a QString created at build time. Initialization of
QString with it has no overhead.
QLatin1String is 8 bit C string wrapper which needs run-time conversion
to 16 bit encoding used in QString.
Fixes warning:
"kf5.kxmlgui: 0xXXXXXXXXXXXX deleted without having been removed from
the factory first. This will leak standalone popupmenus and could lead
to crashes."
This reverts commit d689ba5403.
I should have tested this more; this breaks a number of things as
switching doesn't execute the 'Command'. Since the next release is
close, let's just revert for now.
FIXED-IN: 19.08
CCBUG: 319926
Something in Qt has changed, so e. g. Super_L isn't passed as a modifier
anymore, so there's a regression from what
eea5ecfc5e fixed.
This is especially annoying e. g. for people using i3, where just
switching focus away with the keyboard will lead to Konsole scrolling
back to the bottom.
Summary:
Fixes crash when copying hotspot. It is caused by the code would remove
any actions from the hotspot after the context menu had executed, but
these actions have now been freed because the hotspot is freed (this was
done in 7265be97a2 to fix a memory leak).
Test Plan:
echo https://kde.org/
edit->find
type kde in the search box
select kde.org
right click and click copy
BUG: 408603
Reviewers: #konsole, hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D21849
Summary:
This is what I envision for the Konsole Tab / Splits
management. One tab contain a QSPlitter that can contain
multiple TerminalDisplays / Splits.
You can test this behavior by hitting ctrl + shift + 9
and ctrl + shift + 0 to activate the splits, and ctrl +
shift + t to activate a new tab.
Old:
{F6484123}
New:
{F6484124}
What works:
- Tab Creation
- Split Creation (Even Recursive splitting)
- Terminal Close will close the Split on last split
- Last last split to close will close the tab
- Last tab to close will close konsole
- Detaching
- Tab Renaming
- Closing splits after detach
- Closing windows after detach
- Detach / Reattach works!
This patch series has the commits of Thomas Surrel, Maciej Niedbdalski and Myself.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: luc4, hallas, anthonyfieroni, gennad, ngraham, thsurrel, maciejn, mglb, hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D17643
Summary:
The find action in Yakuake (and other konsolepart users) is missing
a shortcut. This is because the shortcut is only defined for Konsole
and not for the part.
BUG: 313841
Test Plan: Press Ctrl + Shift + F in Yakuake, search bar opens
Reviewers: #konsole, hindenburg, hein
Reviewed By: #konsole, hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D19451
Summary:
This is a proposal to modify the profile shortcuts behaviour:
instead of opening a new tab with the corresponding profile
they now switch the profile of the current terminal display.
FEATURE: 319926
Reviewers: #konsole, hindenburg, tcanabrava
Reviewed By: #konsole, hindenburg
Subscribers: loh.tar, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D17374
Summary:
This patch introduces a UI change: tabs only show an icon if it's not
the default one; that is to say, only if the user has actually customized
the icon. There are several reasons for this:
1. **Conceptual:** When only non-default profile icons show up in the tab,
it does a better job of highlighting the fact that a non-default profile
is being used.
2. **Aesthetic:** you no longer have the same icon in every tab by default,
which looks bad and causes the eye to ignore it over time.
3. **Icon-specific:** the `utilities-terminal` icon doesn't look good
against a dark background (https://bugs.kde.org/show_bug.cgi?id=367696)
4. **Code hygiene:** reduces a bit of redundancy in the session controller
code.
BUG: 401864
CCBUG: 367696
FIXED-IN: 19.04.0
Test Plan:
Open multiple tabs and make one of them use a profile with a
non-default icon:
{F6502534, size=full}
Verify that bell signals still cause tabs to get icons.
Reviewers: #konsole, #vdg, ndavis, hindenburg
Reviewed By: #konsole, #vdg, ndavis, hindenburg
Subscribers: fabianr, abetts, hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D17747
Summary:
Those three classes where *used* inside of the SessionController
but they where not supposed to be there. The code in the
SessionController is already too big to understand, so the removal
of unrelated code is a good thing: it's now easier to reason
about those other three classes without having to deal with
the whole code that the SessionController has.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D17485
Summary:
Change the icon of the session when a `bel` is triggered as a visually alert
BUG: 399140
FIXED-IN: 18.12
Test Plan:
1. Start Konsole and create 2 sessions (tabs) from the same profile
(for example, the default profile)
2. In one tab run `sleep 3; tput bel`
3. Switch to the other tab and wait 3 seconds
Reviewers: #konsole, konsole-devel, hindenburg, ngraham
Reviewed By: ngraham
Subscribers: ngraham, konsole-devel, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D16511
Summary:
Instead of using only the default colors (and white background),
use the correct colors and font from the profile, if available. If
not exporting with a profile, it falls back to the old behavior
(i. e. when copying to clipboard).
Reviewers: hindenburg, #konsole
Reviewed By: hindenburg, #konsole
Subscribers: ngraham, konsole-devel, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D16227
Summary:
Whenever I change the font size doing so is usually temporary and I usually go back to the default font size in after a short time. Currently I do so by changing to a different profile and discarding the change, which resets the font size to the default. I feel like there should be a shortcut for resetting the size.
I could not find an appropriate icon, so I left it without icon.
The default shortcut ctrl+r seemed reasonable and easy to type, 'r' reset.
Test Plan: Manual.
Reviewers: hindenburg, tcanabrava, #vdg, ngraham
Reviewed By: #vdg, ngraham
Subscribers: muhlenpfordt, ach, kvermette, rizzitello, lbergdoll, hindenburg, fabianr, dhaumann, kde-doc-english, z3ntu, ngraham, konsole-devel
Tags: #konsole, #documentation
Differential Revision: https://phabricator.kde.org/D15380
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:
Move the SearchBar to TerminalDisplay, killing the dependency from
the MainWindow and allowing it to be positioned as an overlay.
This fixes the following bugs:
- Opening and closing the SearchBar while top/htop is open
would garble the screen as top would wrongly redraw
two rows below, filling the screen with wrong text
- with tabs and splits, opening two searchbars and
clicking in the close button of the first without
focusing the terminal display first would cause
the tabbar not to close
- Smaller and prettier.
This never belonged here.
Searchbar belongs to the TerminalDisplay
Correctly position the SearchBar on topLeft
Fix initial size of the SearchBar
Icons, Position and Borders
Change the icons, positions and borders
of the SearchBar
Fix fill background of the Search Tab
Don't show the menubar by default
Fix icons & text
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: ahmadsamir, ngraham, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D13511
Summary:
Previously the code enabled sending emulated up/down key press events to
the terminal only if the current screen is the alternate buffer. The
problem with this approach is that when detaching a tab/view, a new
TerminalDisplay is constructed and _isPrimaryScreen is initialized to
true even though the current screen in the detached tab is the alternate
one.
Since the Session is preserved when detaching a tab, move that bit of
code to Session, and query the Session about the currently used screen
buffer.
Test Plan:
Before:
- Open a window with two tabs, and in one of them execute `man man`
- Make sure "Enable Alternate screen buffer scrolling" is enabled in the
current profile, and that you can can scroll in the alternate buffer
- Detach the tab showing the manual page, now scrolling doesn't work in
the alternate buffer
With the patch applied, scrolling should work after detaching the tab.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D13217
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:
`_preserveLineBreaks` was set/reset only in mousePressEvent, and was
initially disabled. This led to use of the last setting from mouse
selection, or initial value, by "Select All".
BUG: 352616
Test Plan:
* Start Konsole
* Run `seq 100`
* (optional, test should give the same effect with and without this step)
Press {key Ctrl} and select some text
* Edit → Select All
* Copy
* Paste in any text editor
**Expected result:** text should be in multiple lines (like on
Konsole screen)
**Actual result:** text is pasted as one line
=== Regression tests ===
* Run `seq 100`
* Select few lines using mouse
* Copy
* Paste in any text editor
**Expected result:** text should be in multiple lines (like on
Konsole screen)
* Run `seq 100`
* Press {key Ctrl} and select few lines using mouse
* Copy
* Paste in any text editor
**Expected result:** text should be pasted as one line
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D12058