Summary: | Profile changing escape sequence resets font size changed with a keyboard shortcut | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Bartosz Marcinkowski <bm371613> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | a.samirh78, bm371613, egmont, gerhard.gappmeier, simonandric5 |
Priority: | NOR | ||
Version: | master | ||
Target Milestone: | --- | ||
Platform: | Manjaro | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/konsole/18014c75f2c3ecb53f77b27b7b05037584d3872e | Version Fixed In: | 18.04 |
Sentry Crash Report: |
Description
Bartosz Marcinkowski
2017-11-08 12:10:23 UTC
I looked into source code, and the problem seems to be that escape sequences modify font in one place(profile), but the keyboard shortcut modifies it in another object (TerminalDisplay). If you change the profile object with an escape sequence, it will pick the unchanged font in profile and overwrite the changed font in TerminalDisplay. A simple solution would be to make the shortcuts modify font in profile, as it happens if you modify font size with an escape sequence. Would that be ok? (In reply to Bartosz Marcinkowski from comment #1) > A simple solution would be to make the > shortcuts modify font in profile, as it happens if you modify font size with > an escape sequence. Would that be ok? It sounds to me that a one-off Ctrl+Plus would permanently change the profile settings, and subsequent windows will all open at the new, increased size? I wouldn't be in favor of this idea. What is done in VTE is: there's a per-profile font, and a per-terminal zoom factor. The actual font to use is always derived from this two. (In reply to Bartosz Marcinkowski from comment #1) > as it happens if you modify font size with > an escape sequence. Would that be ok? Hmmm, so an escape sequence emitted in one profile effects all other terminal windows that use the same profile? Doesn't sound good either. Or I fundamentally misunderstand something. > Hmmm, so an escape sequence emitted in one profile effects all other
> terminal windows that use the same profile? Doesn't sound good either. Or I
> fundamentally misunderstand something.
If you split view to have two views of the same session and type
echo -en '\e]50;CursorShape=1\x7'
both are changed - so the answer is yes if I understand it right. That's why I figured it would be acceptable for shortcuts to work the same way.
So by "profile" you mean something that's common to all panes of the same terminal during a split (something VTE doesn't have), and _not_ automatically altering the values the user can set under Edit Current Profile. In that case
> Or I fundamentally misunderstand something.
I indeed did. Thanks for the clarification and sorry for the noise!
Another effect of the same mechanism: if you change font size with a shortcut and then, in the profile editing window, hover over another colour scheme, the font size change is lost. *** Bug 389459 has been marked as a duplicate of this bug. *** (In reply to Bartosz Marcinkowski from comment #6) > Another effect of the same mechanism: if you change font size with a > shortcut and then, in the profile editing window, hover over another colour > scheme, the font size change is lost. IMHO this ^ is a different issue; the patch in the review request in phabricator only addresses the original issue in this report, i.e. preserving the zoom font sizes after changing profile properties with an escape sequence (or via the command line option '-p'). Git commit 18014c75f2c3ecb53f77b27b7b05037584d3872e by Kurt Hindenburg, on behalf of Ahmad Samir. Committed on 28/02/2018 at 04:23. Pushed by hindenburg into branch 'master'. Restore zoom fonts after changing profile with ESC sequences Summary: When a profile property is changed via the command line or an ESC sequence a new temp profile is created and applied, this resets the zoom values in the views connected to the session. Save zoom font sizes and restore them after the new profile is applied. FIXED-IN: 18.04 Reviewers: hindenburg Reviewed By: hindenburg Subscribers: ngraham, #konsole Tags: #konsole Differential Revision: https://phabricator.kde.org/D10650 M +20 -0 src/SessionManager.cpp https://commits.kde.org/konsole/18014c75f2c3ecb53f77b27b7b05037584d3872e |