Unfortunately the code is still fragile and I froze konsole
a few times in a few minutes. This is something that konsole
really needs, but we need more time to squish all the bugs
we find.
Summary:
Move the Q_DECLARE_OPERATORS_FOR_FLAGS macro declaration for the
DecodingOption enum to the Konsole namespace. This should fix a bug that
happens when KeyboardTranslator.h is included in Screen.h (either
directly or indirectly), where the compiler doesn't find the |() operator
of the QFlags class.
I haven't pinpointed where the conflicting |() operator is coming from
exactly, but moving the macro declaration to the Konsole namespace
matches how other QFlags are used through out the code (and matches
upstream doc examples).
Test Plan:
- Add this include to Screen.h and try to compile:
#include "KeyboardTranslator.h"
- The compilation fails in SessionController.cpp:
error: invalid conversion from 'int' to 'Konsole::Screen::DecodingOption'
The line it fails on is 1200:
QString selectedText = _view->screenWindow()->selectedText(Screen::PreserveLineBreaks | Screen::TrimLeadingWhitespace | Screen::TrimTrailingWhitespace);
- Apply the diff and build again, the build should complete
I tested the options from the DecodingOption enum from the Screen class and they still work as before
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D12797
- Do not automatically reset the search start line on search hits
This was causing the annoying behavior that if you were to pause while typing
in a search term, and it would actually find a hit, then you would be searching
for the term a second time once you finish typing.
This commit introduces two new behaviors:
1. When you show the search bar, all searching will be done from the first
visible line in the terminal.
2. This start position is only reset when you
advance to the next result, by pressing "next", "previous", or the shortcuts
RETURN or SHIFT-RETURN
- When the view scrolls to a result, it will appear centered.
- When showing the search bar, do not invoke a search, only apply the highlight filters
- Add "search from beginning/end" button
This will scroll to the top/bottom before searching
Ctrl+return is also bound to this action
- Text highlighted by mouse will be set as the current search text when the incremental
search bar is opened
- Add "Search backwards" to search bar options
Button text is swapped according to reverse search switch
(cherry picked from commit aa42a27ef3)
- Do not automatically reset the search start line on search hits
This was causing the annoying behavior that if you were to pause while typing
in a search term, and it would actually find a hit, then you would be searching
for the term a second time once you finish typing.
This commit introduces two new behaviors:
1. When you show the search bar, all searching will be done from the first
visible line in the terminal.
2. This start position is only reset when you
advance to the next result, by pressing "next", "previous", or the shortcuts
RETURN or SHIFT-RETURN
- When the view scrolls to a result, it will appear centered.
- When showing the search bar, do not invoke a search, only apply the highlight filters
- Add "search from beginning/end" button
This will scroll to the top/bottom before searching
Ctrl+return is also bound to this action
- Text highlighted by mouse will be set as the current search text when the incremental
search bar is opened
- Add "Search backwards" to search bar options
Button text is swapped according to reverse search switch
In the ongoing issue with spaces at the end of lines, this allows for
an option to trim the spaces. By default, it is disabled so only
people who need this will be affected.
Many thanks to David Smid <david@smidovi.eu>
CCBUG: 188528
* Add a method in ScreenWindow to set the size of the window (in lines, the number of columns is still ifxed).
* Call this method in TerminalDisplay to set the window size when the widget is resized or when the screen window of a display is initially set.
* Fix ScreenWindow::getImage() and ScreenWindow::getLineProperties() so that they do not attempt to retrieve information about lines beyond the end of the screen.
* Fix ScreenWindow::getLineProperties() to always return result vector of size windowColumns(), though the number of elements copied from the screen may be less.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=749874
KWindowSystem::compositingActive() works without a QApplication instance.
* Make terminal display intercept shortcuts using the Backspace/Home/End keys
( fixes backspace key triggering the 'Go Back' action in Dolphin when
terminal part has the focus )
* Add some plumbing that will be used to handle resizing by the terminal
program.
* Misc. tidy-ups and EBN fixes.
* Update the right part of the terminal display when updating blinking
cursor.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=668460