diff --git a/lib/TerminalDisplay.cpp b/lib/TerminalDisplay.cpp index 088e80e..d31f484 100644 --- a/lib/TerminalDisplay.cpp +++ b/lib/TerminalDisplay.cpp @@ -3219,8 +3219,8 @@ int TerminalDisplay::margin() const void TerminalDisplay::setMargin(int i) { - _topMargin = i; - _leftMargin = i; + _topBaseMargin = i; + _leftBaseMargin = i; } AutoScrollHandler::AutoScrollHandler(QWidget* parent) diff --git a/lib/qtermwidget.cpp b/lib/qtermwidget.cpp index 32762e7..a5b796d 100644 --- a/lib/qtermwidget.cpp +++ b/lib/qtermwidget.cpp @@ -764,3 +764,13 @@ void QTermWidget::cursorChanged(Konsole::Emulation::KeyboardCursorShape cursorSh setKeyboardCursorShape(cursorShape); setBlinkingCursor(blinkingCursorEnabled); } + +void QTermWidget::setMargin(int margin) +{ + m_impl->m_terminalDisplay->setMargin(margin); +} + +int QTermWidget::getMargin() const +{ + return m_impl->m_terminalDisplay->margin(); +} diff --git a/lib/qtermwidget.h b/lib/qtermwidget.h index 2bce322..03b017b 100644 --- a/lib/qtermwidget.h +++ b/lib/qtermwidget.h @@ -221,6 +221,12 @@ public: /** change and wrap text corresponding to paste mode **/ void bracketText(QString& text); + + /** Set the empty space outside the terminal */ + void setMargin(int); + + /** Get the empty space outside the terminal */ + int getMargin() const; signals: void finished(); void copyAvailable(bool);