Jekyll Wu
26331fc17c
assert ==> Q_ASSERT
2012-03-01 19:30:56 +08:00
Jekyll Wu
f42fd4721b
Clean up unneeded #includes
2012-02-20 19:41:38 +08:00
Kurt Hindenburg
30a4fa669e
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:13:03 -05:00
Kurt Hindenburg
bc087ae51b
Remove unused KDebug includes
2011-12-18 00:01:32 -05:00
Jekyll Wu
72a1adc631
Avoid extra trailing whitespace when copying text
...
A new 'isRealCharacter' flag is added into the 'Character' class
to distinguish real characters and charaters used as place holders.
The code is a bit ugly now. Should improve it later when the idea and
implementation are proven to be feasible and cause no regression.
CCBUG: 188528
2011-11-26 10:59:08 +08:00
Kurt Hindenburg
0905a301e6
Prevent crashing when dumping binary files to terminal.
...
"cat"ing binary files often crashes Konsole. This patch checks the
indicies.
Note that there are tons of 'undecodable sequences' that also print
out. These likely should not be displayed unless debugging.
BUG: 184964
FIXED-IN: 4.8
2011-11-13 16:21:49 -05:00
Jekyll Wu
125e2c7bd2
Declare pointer and reference in a consistent way
...
Most code use the "const QString& text" form, instead of the "const
QString &text" form. So change the minority to be consistent with
the majority.
2011-11-06 06:13:28 +08:00
Jekyll Wu
50a07d79da
Remove dead method Screen::compose(String)
2011-11-03 06:53:49 +08:00
Jekyll Wu
e825a8e0b6
Prefer forward declaration when it is enough
2011-11-01 13:41:54 +08:00
Jekyll Wu
c84c55d52b
Remove inapproriate TODO and useless comment
2011-10-19 04:38:36 +08:00
Jekyll Wu
c001df918c
Minor change on constructor
2011-10-19 04:38:36 +08:00
Jekyll Wu
d3e6c479ff
Remove dead #define
2011-10-19 04:38:36 +08:00
Albert Astals Cid
005e1cfb87
Fix crash handling combining characters
...
If you get a combining character as first "character" of a new line
what we used to go was go to the previous line and combine with the character of the end
This assumption is wrong as sometimes a combining character may appear "on its own" without nothing to combine with
If someone has time it is worth investigating what is the correct behaviour in those cases as it seems gnome-terminal shows the character even if it has nothing to combine with
2011-10-16 18:51:38 +02:00
Jekyll Wu
e497e0ac32
Use Screen::defaultChar instead of Character() for readability
2011-10-15 16:23:52 +08:00
Jekyll Wu
7a6f2aff0c
Reuse Screen::defaultChar to reduce duplicated code
2011-10-14 14:41:11 +08:00
Jekyll Wu
37a8f1e75c
Less #defines, more constants
2011-10-13 20:08:07 +08:00
Jekyll Wu
272ac9850e
Include KDE headers consistently in the from of "#include <KSomething>" .
...
However, some KDE headers are still only available in the form of
"#include <ksomething.h>"
krun.h ==> KRun
kicon.h ==> KIcon
kdebug.h ==> KDebug
kshell.h ==> KShell
kdialog.h ==> KDialog
kconfig.h ==> KConfig
klocale.h ==> KLocale
kglobal.h ==> KGlobal
kcolorutils.h ==> KColorUtils
kconfiggroup.h ==> KConfigGroup
kdesktopfile.h ==> KDesktopFile
kcolorscheme.h ==> KColorScheme
kstandarddirs.h ==> KStandardDirs
ktemporaryfile.h ==> KTemporaryFile
klocalizedstring.h ==> KLocalizedString
2011-09-23 05:04:46 +08:00
Jekyll Wu
ca3ef60d6d
Fix the problem of possibly losing the last line after resizing window.
...
This is a simple one-line patch, so it can be reverted easily if
unfortunately needed.
BUG:192221
FIXED-IN:4.8
REVIEW:102177
2011-09-22 01:35:49 +08:00
Jaime Torres
bfc17f4a94
No need for a variable to store a value, use it and forget it
...
To compare the result of a method only with a calculated value, there
is no need for a local variable. Let the compiler create itself the
value in the best place, stack or registry.
2011-09-18 11:29:30 +02:00
Jekyll Wu
771b4b2228
ANSI escape code "\e[1;93m" should generate intensive color.
...
The current behavior is bold(1) will toggle the intensity of an
intensive color(93), so the result is a normal color. This is
counter-intuitive. Xterm, rxvt, and all vte-base emulators generate
intensive color in this case.
BUG: 274603
FIXED-IN: 4.8
REVIEW: 102554
2011-09-14 06:34:50 +08:00
Jekyll Wu
4dd68c4c5b
Do not append extra space when copying wrapped lines.
...
This is a fix for the regression caused by commit 4f8da8.
BUG: 136730
2011-08-15 06:02:57 +08:00
Kurt Hindenburg
4f8da80fec
Use SPACE as delimiter when joining multiple lines.
...
Currently, when users use ctrl+mouse to select and copy multiple lines,
those lines are joined into single line in a seamless way. LINEBREAK is
simply removed, thus the first character of second line will be
positioned right after the last character of the first line. This patch
replaces the LINEBREAK with a SPACE.
Thanks to Jekyll Wu (adaptee@gmail.com ) for patch and research.
BUG: 136730
FIXED-IN: 4.8
2011-07-24 16:27:24 -04:00
Albert Astals Cid
d4953bff85
There can be more than one combining character per character
...
So do not assert when that happens. More info at bug 276720
2011-07-03 15:15:54 +01:00
Albert Astals Cid
c335324f31
Support Unicode decomposed characters
...
BUGS: 96536
2011-06-26 16:32:30 +01:00
Albert Astals Cid
81e23b6621
Make Character constructor explicit
2011-06-26 16:10:44 +01:00
Kurt Hindenburg
6b2440e2c2
comment out kDebugs - change some to kWarnings
...
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1148447
2010-07-10 17:22:28 +00:00
Kurt Hindenburg
b78a3f75a1
Correct ANSI's 'delete char' to delete the last character in a line.
...
Patch provided by Alexandre Becoulet
BUG: 217669
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1119662
2010-04-27 15:26:36 +00:00
Kurt Hindenburg
a1d0a1d345
Fix issue where history lines had extra spaces at end.
...
Thanks to Orion Poplawski for patch.
I will backport to 4.4.1 later.
BUG: 188528
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1083161
2010-01-31 18:50:19 +00:00
Darío Andrés Rodríguez
b8a3bdd833
- Reduce the ammount of unused vars/parameters warnings
...
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1049628
2009-11-15 15:41:16 +00:00
Kurt Hindenburg
e6ec9b0a77
Do not delete whitespace if at end of wrapping line.
...
BUG: 90201
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=944121
2009-03-25 04:49:30 +00:00
Kurt Hindenburg
e66041e0d9
Revert previous patch; need to only delete space if at end of screen line
...
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=941444
2009-03-19 14:52:32 +00:00
Kurt Hindenburg
460ba919d6
Clear selection on selected text when it is not static.
...
CCBUG: 153372
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=941205
2009-03-19 03:54:42 +00:00
Kurt Hindenburg
56e071c3b9
Do not remove whitespace if it is the last character of wrapping line.
...
BUG: 90201
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=941200
2009-03-19 03:06:17 +00:00
Robert Knight
8992f72f5f
Reformat Screen.cpp with 4-space instead of 2-space indentation to match the other, more recently written source files.
...
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=864904
2008-09-25 21:47:11 +00:00
Robert Knight
69603cb4b4
* Cleanup of Screen class. Improve member variable names, remove
...
outdated comments and dead code.
* Further minor cleanups of Emulation and Vt102Emulation classes.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=864898
2008-09-25 21:33:26 +00:00
Robert Knight
1f79308a29
Simplify Screen::isSelected() given that the selection is now normalized in column mode.
...
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=863366
2008-09-21 22:05:07 +00:00
Robert Knight
4228ca077d
Fix crash when creating a block selection (with Ctrl+Alt pressed) by dragging
...
right-to-left. Normalize the selection in Screen::setSelectionEnd() so that
in column mode, column(sel_TL) <= column(sel_BR)
BUG:171187
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=863361
2008-09-21 21:59:11 +00: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
9b2748f978
Screen: Formatting (method name - parenthesies spacing) and method name tidy-up (consistent use of mixedCase)
...
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=819760
2008-06-12 02:40:26 +00:00
Robert Knight
f88bbcc737
Screen: Remove out-of-date API comments from the implementation file left over from KDE 3. Update API documentation in header file where necessary.
...
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=815511
2008-06-02 02:05:13 +00:00
Dirk Mueller
7ecf3169e6
different way to protect against integer overflows, as suggested
...
by Robert Night
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=808165
2008-05-15 20:31:48 +00:00
Dirk Mueller
ba792edf4f
be more robust against possible integer overflows
...
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=806072
2008-05-09 22:16:40 +00:00
Robert Knight
5d9997446e
Update copyright year to 2008. Remove '(C)' from copyright lines.
...
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=800631
2008-04-24 14:53:43 +00:00
Robert Knight
971a5315f9
Remove debugging messages.
...
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=800628
2008-04-24 14:52:39 +00:00
Robert Knight
72ed114978
Only remove trailing whitespace from the end of the line when copying from the screen to the clipboard or selection. If the current selection ends with white space but does not extend to the end of the line then that white space is included in the copied text.
...
BUG: 159261
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=787010
2008-03-18 13:20:01 +00:00
Robert Knight
b19855ab45
Allow selection of the new line character at the end of the last line of the selection. When the cursor goes beyond the end of the text on the last line of the selection, a new line character is added to the text sent to the clipboard. This behaviour is consistent with Konsole in KDE 3.5
...
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=780739
2008-02-29 21:57:50 +00:00
Robert Knight
e25795377f
Fix column mode (Ctrl+Alt) selection.
...
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=761903
2008-01-15 16:30:09 +00:00
Robert Knight
b7130971de
Fix grave bug where Konsole would crash when randomly clicking around the terminal window, due to an attempt to allocate a QString with a negative size.
...
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=759891
2008-01-11 12:16:47 +00:00
Robert Knight
7a63999dd9
Forward port fix for bug 155153. The end of the first line was corrupted when copying multiple lines of output from the terminal. Patch by Dmitriy Taychenachev.
...
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=757711
2008-01-05 18:09:40 +00:00
Robert Knight
7ba1fa2816
Fix some problems with double width characters. A while() loop was re-written in a way which introduced a dependancy on a variable (cuX) without taking into account that it was modified just before entering the loop. Introduce a temporary and move the variable assignment to after the loop.
...
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=755308
2008-01-01 01:25:46 +00:00