Changeset View
Changeset View
Standalone View
Standalone View
src/TerminalDisplay.cpp
Show First 20 Lines • Show All 2728 Lines • ▼ Show 20 Line(s) | 2702 | { | |||
---|---|---|---|---|---|
2729 | // * otherwise, send simulated up / down key presses to the terminal program | 2729 | // * otherwise, send simulated up / down key presses to the terminal program | ||
2730 | // for the benefit of programs such as 'less' | 2730 | // for the benefit of programs such as 'less' | ||
2731 | if (_mouseMarks) { | 2731 | if (_mouseMarks) { | ||
2732 | const bool canScroll = _scrollBar->maximum() > 0; | 2732 | const bool canScroll = _scrollBar->maximum() > 0; | ||
2733 | if (canScroll) { | 2733 | if (canScroll) { | ||
2734 | _scrollBar->event(ev); | 2734 | _scrollBar->event(ev); | ||
2735 | _sessionController->setSearchStartToWindowCurrentLine(); | 2735 | _sessionController->setSearchStartToWindowCurrentLine(); | ||
2736 | _scrollWheelState.clearAll(); | 2736 | _scrollWheelState.clearAll(); | ||
2737 | } else { | 2737 | } else if (_sessionController->session()->isForegroundProcessActive()) { | ||
2738 | // assume that each Up / Down key event will cause the terminal application | 2738 | // assume that each Up / Down key event will cause the terminal application | ||
2739 | // to scroll by one line. | 2739 | // to scroll by one line. | ||
2740 | // | 2740 | // | ||
2741 | // to get a reasonable scrolling speed, scroll by one line for every 5 degrees | 2741 | // to get a reasonable scrolling speed, scroll by one line for every 5 degrees | ||
2742 | // of mouse wheel rotation. Mouse wheels typically move in steps of 15 degrees, | 2742 | // of mouse wheel rotation. Mouse wheels typically move in steps of 15 degrees, | ||
2743 | // giving a scroll of 3 lines | 2743 | // giving a scroll of 3 lines | ||
2744 | 2744 | | |||
2745 | const int lines = _scrollWheelState.consumeSteps(static_cast<int>(_fontHeight * qApp->devicePixelRatio()), ScrollState::degreesToAngle(5)); | 2745 | const int lines = _scrollWheelState.consumeSteps(static_cast<int>(_fontHeight * qApp->devicePixelRatio()), ScrollState::degreesToAngle(5)); | ||
▲ Show 20 Lines • Show All 307 Lines • ▼ Show 20 Line(s) | 3045 | if ((chars != nullptr) && extendedCharLength > 0) { | |||
3053 | } | 3053 | } | ||
3054 | return letterOrNumber ? QLatin1Char('a') : s.at(0); | 3054 | return letterOrNumber ? QLatin1Char('a') : s.at(0); | ||
3055 | } | 3055 | } | ||
3056 | return 0; | 3056 | return 0; | ||
3057 | } else { | 3057 | } else { | ||
3058 | const QChar qch(ch.character); | 3058 | const QChar qch(ch.character); | ||
3059 | if (qch.isSpace()) { | 3059 | if (qch.isSpace()) { | ||
3060 | return QLatin1Char(' '); | 3060 | return QLatin1Char(' '); | ||
3061 | } | 3061 | } | ||
hindenburg: remove return | |||||
3062 | 3062 | | |||
3063 | if (qch.isLetterOrNumber() || _wordCharacters.contains(qch, Qt::CaseInsensitive)) { | 3063 | if (qch.isLetterOrNumber() || _wordCharacters.contains(qch, Qt::CaseInsensitive)) { | ||
3064 | return QLatin1Char('a'); | 3064 | return QLatin1Char('a'); | ||
3065 | } | 3065 | } | ||
3066 | 3066 | | |||
3067 | return qch; | 3067 | return qch; | ||
3068 | } | 3068 | } | ||
3069 | } | 3069 | } | ||
▲ Show 20 Lines • Show All 744 Lines • Show Last 20 Lines |
remove return