Commit 46d9100f authored by Carlos Alves's avatar Carlos Alves Committed by Kurt Hindenburg
Browse files

Correct columns size with highlightScrolledLines

When highlightScrolledLines is set to display the Konsole new window
will open with the display profile terminal size columns  - 1.
Now it will check the options and correct the Konsole size to display
all columns set in profile terminal size.

BUG: 429600
parent fd59b50e
......@@ -218,8 +218,12 @@ void SessionManager::applyProfile(Session *session, const Profile::Ptr &profile,
if (apply.shouldApply(Profile::TerminalColumns)
|| apply.shouldApply(Profile::TerminalRows)) {
const auto columns = profile->property<int>(Profile::TerminalColumns);
const auto highlightScrolledLines = profile->property<bool>(Profile::HighlightScrolledLines);
const auto rows = profile->property<int>(Profile::TerminalRows);
auto columns = profile->property<int>(Profile::TerminalColumns);
// highlightScrolledLines takes 1 column to display, correct it
// adding 1 to terminal initial columns profile preference
columns += highlightScrolledLines ? 1 : 0;
session->setPreferredSize(QSize(columns, rows));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment