When saving the fallback profile to a new profile, we have to delay
calling addProfile until after a path has been set for the new profile.
This is because ProfileModel::populate calls ProfileManager::sortProfiles,
and the latter skips profiles that have path == FALLBACK/ .
This also seems to take care of duplicate entries in "Switch Profile"
menu, with respect to the fallback profile after saving.
Modify changeProfile to always work on the Profile::Ptr arg it's called
on,this is needed to be able to call setProfile from EditProfileDialog
aftersaving the fallback profile; the fallback profile is special in
many ways,most important of which is that it's never saved to a .profile
on disk, sincechangeProfile is going to give the newly saved profile a
unique name, e.g."Profile 1", we need to update the EditProfileDialog
with the new profile,so that saving settings works and actually modifies
the new profile ratherthan the fallback one. This also means that the
profile ptr that the currentSession is using will point to the
modified/saved profile and not thefallback one.
After the fallback profile is "saved" to a new profile, we init another
instance of the fallback profile, so that it's always availabe in the
"Switch profile" context menu.
Reserve the profile name "Default" for the fallback profile.
The previous behavior was actually the intended one, the URL hints are
intended to strictly increase from start to finish (physically on the
keyboard).
It might not be "technically" correct, but that's the original behavior
before the refactor (and I think it makes the most sense, that's why I
implemented it that way originally).
Also fixes activating the first URL, activating 0 didn't work.
This reverts commit 28e1a3e634.
BUG: 427293
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^[\"
Then if one of the classes that inherit HotSpot need to reimplement an
input event, it can do so. I think this way we get less code duplication,
and if we need to change those methods, there is a chance only changing the
base implementation is necessary.
This also fixes file filter.
Initialise member variables in FilterChain ctor, particularly initialising
_showUrlHint prevents an issue where url hints are displayed when moving
the mouse for the first time in a newly opened konsole window even if no
url hint modifiers are pressed.
In keyPressEvent it seems calling update() on the TerminalDisplay isn't
needed.