Commit Graph

39 Commits

Author SHA1 Message Date
Kurt Hindenburg
7bc9794503 For returns use a braced initializer list 2018-10-27 22:37:16 -04:00
Kurt Hindenburg
8b4cbcaf7a Use constuctor initialization list for all members 2018-04-01 11:30:45 -04:00
Kurt Hindenburg
2e86be05dc Implement support for trimming leading whitespace
There's already an option for removing trailing whitespace.

Combining both pulls since the later makes the code easier to read.

Patches by sandsmark

Differential Revision: https://phabricator.kde.org/D8381
Differential Revision: https://phabricator.kde.org/D8417
2017-12-25 11:30:35 -05:00
Kurt Hindenburg
2a2a56d73c modernize use nullptr 2017-07-15 23:28:32 -04:00
Kurt Hindenburg
0d8aeaa4df uncrustify using kf5 config 2017-06-27 22:05:11 -04:00
Kurt Hindenburg
abb83e8ef0 Add support for copying HTML formatted text from terminal
Currently, only text is supported - this add HTML

Thanks to Anonymous Koavohv koavohv gmail com

REVIEW: 119914
2014-10-04 11:57:54 -04:00
Kurt Hindenburg
707f341de3 Change constuctor - calls now have to give Screen
new ScreenWindow() is only called from emulation - might as well
pass the Screen to it

(cherry picked from commit ffeaf3a33f)
2014-04-16 21:40:15 -04:00
Kurt Hindenburg
1ea501da62 remove include moc from .cpp files - removes build warnings 2013-10-22 20:07:23 -04:00
Harald Hvaal
473f48f371 Various search improvements
- 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)
2013-08-23 20:49:57 -04:00
Kurt Hindenburg
b5dbf6b32f minor space/tab fixes 2013-03-16 12:36:05 -04:00
Kurt Hindenburg
3cd4d2e440 Add profile option to scroll full/half height via Page Up/Down keys
The default is still half page - there is no GUI to change this;
either use konsoleprofile or change the .profile manually.

CCBUG: 280637
2013-02-24 12:03:46 -05:00
Kurt Hindenburg
ca9dd11bf5 Allow option to trim spaces at end of line
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
2012-09-09 19:10:41 -04:00
Kurt Hindenburg
af20d27871 check to handle issue w/ fillWithDefaultChar given huge -count
Previously, the count could be a huge negative number which could
    exceed what an int can handle.  Also, there's no reason to calculate
    this number if it will be negative.

    CCBUG: 246484
2012-06-09 15:49:28 -04:00
Kurt Hindenburg
6d9d49aafb Correct issue of triple clicking and scrolling up.
Fixes selecting text by triple click and scrolling up causes only the
visible contents to be selected.

Thanks to Shlomi Fish (shlomif@iglu.org.il) for research and patch.

BUG: 256353
REVIEW: 103724
FIXED-IN: 4.9
2012-01-28 11:26:57 -05:00
Kurt Hindenburg
ad62a64037 Apply astyle-kdelibs
Over the years, the coding style is all over the place.

Use 'git diff -w --ignore-all-space' to see non-whitespace changes.
2011-12-24 11:14:42 -05:00
Kurt Hindenburg
bc087ae51b Remove unused KDebug includes 2011-12-18 00:01:32 -05:00
Jekyll Wu
cf92cece2b Remove leading white spaces in blank lines to make them really empty 2011-11-05 07:29:21 +08:00
Jekyll Wu
d11fd4ea18 Add "Select All" action for selecting the whole history of this session.
FEATURE:  199990
FIXED-IN: 4.8
REVIEW: 102372
2011-09-20 00:33:07 +08:00
Jekyll Wu
e828def700 Reorgnazie some #include. 2011-09-06 06:53:38 +08:00
Robert Knight
956277c014 Convert tabs to 4 spaces to match kdelibs conventions. Previously
there was a mix of tabs and spaces for indentation.

CCMAIL:Stefan.Becker@nokia.com


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=863326
2008-09-21 20:06:58 +00:00
Robert Knight
d8615c2cd5 Fix assert crash when processing filters. Add bounds check in ScreenWindow::currentLine() and use the method internally instead of reading _currentLine directly. Fix the scroll region when the screen window has a different size to the screen. CCBUG: 155234
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=766412
2008-01-25 19:47:51 +00:00
Robert Knight
46cfc108d3 * Replace all usage of qDebug() with kDebug(), since kDebug() provides information about
which part of the code the message came from and allows filtering of output
  using kdebugdialog
* Remove explicit creation of singleton classes SessionManager,ColorSchemeManager and
  KeyboardTranslatorManager and automate it with K_GLOBAL_STATIC.
  This ensures that the singleton destructors are called appropriately by KPart clients
  when they unload the libkonsolepart library.


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=754334
2007-12-29 16:07:31 +00:00
Robert Knight
38f170c448 Fix assert failure when splitting the view when there are tabs with no history or a very short history.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=753519
2007-12-27 18:22:59 +00:00
Robert Knight
6d08863993 * Take into account the difference between the ScreenWindow's window size and
the Screen's screen size when adjusting the position of the window to track
  the bottom of the screen.

* Fill the area of the window beyond the end of the screen with blank characters.
  
* Any attempts to make a selection beyond the end of the screen are treated as if
  the mouse was on the last line of the screen.  

* Minor formatting fixes for long lines


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=749890
2007-12-18 06:35:58 +00:00
Robert Knight
c708aff22c Fix the long standing limitation where multiple views on the same terminal session had to be the same size - the size of the smallest view. This means that it is now possible, for example, to have a large view on a session for browsing and examining output and a smaller view on the same session for input. The underlying terminal does not support the concept of multiple windows, so the size reported to terminal applications is still that of the smallest view. Full-screen applications such as vim and emacs will therefore be the size of the smallest view on all views.
* 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
2007-12-18 04:32:05 +00:00
Robert Knight
a51b972080 Rename Screen::getCookedLineProperties() to Screen::getLineProperties() and add an extra parameter to control the number of lines whoose properties are returned.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=749867
2007-12-18 03:54:57 +00:00
Robert Knight
ada0d91b82 * Avoid allocating a new buffer to hold character data on every screen update.
Instead a single buffer is created and maintained by ScreenWindow.
* Re-write Screen::getCookedImage() and rename to getImage() to make it possible
  to retrieve an image of a section of the screen which is not the same size as
  the terminal screen.
* Make various non-mutating Screen methods const


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=749864
2007-12-18 03:25:22 +00:00
Robert Knight
ad4208b0e6 Fix crash occurring when clearing the history when there was a view on the session which is not at the bottom. Add assertions to catch such errors earlier in future.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=681379
2007-06-28 19:03:26 +00:00
Robert Knight
ecb43ae37f Avoid scrolling views unnecessarily when splitting the view.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=673774
2007-06-11 05:36:19 +00:00
Robert Knight
de79549e8f Prevent scrolling of views which are not following the latest output when new output is received from the terminal and the history is full.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=670451
2007-06-01 14:27:26 +00:00
Robert Knight
82ac07fec2 Change the character -> text decoding API so that Konsole can produce better quality HTML when output is saved. Fix crashing when resizing display introduced in yesterday's scrolling changes and add assertions to catch invalid memory accesses.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=669305
2007-05-28 23:58:31 +00:00
Robert Knight
e7f1b7904a Allow the scrolling optimisation to work on regions of the display instead of the whole screen. This makes it work with split/screen vi/Screen etc. Doesn't work with applications that use vertical splits.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=668839
2007-05-27 21:26:42 +00:00
Robert Knight
76b0f58867 * Add check for compositing on startup now that
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
2007-05-26 14:07:24 +00:00
Robert Knight
0956611a06 Update output tracking state of screen window when scrolling using Shift+Page/Arrow keys
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=666825
2007-05-20 23:35:51 +00:00
Robert Knight
8a81e29f8f Reimplement scrolling the display up and down using the keyboard. This is now done in the display rather than the emulation, which allows displays on the same session to be scrolled independantly, but doesn't respect the scroll commands defined in the key bindings file.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=666607
2007-05-20 12:15:10 +00:00
Robert Knight
73df051eb6 Fix URL filters not being updated when scrolling the display. Fix URLs being left underlined when moving mouse outside of target area.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=665822
2007-05-18 04:01:02 +00:00
Dirk Mueller
9ea3227384 include cleanup
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=663054
2007-05-09 22:23:52 +00:00
Robert Knight
33c913383d EBN fixes. Mostly copyright and implementations including their own headers first.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=662726
2007-05-09 00:01:01 +00:00
Robert Knight
19a29d182a Rename directories for clarity. konsole -> src , other -> data.
svn path=/branches/work/konsole-split-view/; revision=661562
2007-05-05 23:33:05 +00:00