Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
86b89477
Commit
86b89477
authored
Aug 05, 2007
by
Robert Knight
Browse files
Attempt
#2
to fix assert failure when deleting chars.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=696791
parent
503fdd02
Changes
1
Show whitespace changes
Inline
Side-by-side
src/Screen.cpp
View file @
86b89477
...
...
@@ -279,7 +279,16 @@ void Screen::eraseChars(int n)
void
Screen
::
deleteChars
(
int
n
)
{
if
(
n
==
0
)
n
=
1
;
// Default
Q_ASSERT
(
n
>=
0
);
// always delete at least one char
if
(
n
==
0
)
n
=
1
;
// if cursor is beyond the end of the line there is nothing to do
if
(
cuX
>=
screenLines
[
cuY
].
count
()
)
return
;
if
(
cuX
+
n
>=
screenLines
[
cuY
].
count
()
)
n
=
screenLines
[
cuY
].
count
()
-
1
-
cuX
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment