Fix assert after ^W and Delete key events in the debugger, when there's nothing on the line.
svn-id: r47801
This commit is contained in:
parent
5678269280
commit
17f198369d
1 changed files with 8 additions and 4 deletions
|
@ -468,8 +468,10 @@ void ConsoleDialog::specialKeys(int keycode) {
|
|||
void ConsoleDialog::killChar() {
|
||||
for (int i = _currentPos; i < _promptEndPos; i++)
|
||||
buffer(i) = buffer(i + 1);
|
||||
buffer(_promptEndPos) = ' ';
|
||||
_promptEndPos--;
|
||||
if (_promptEndPos > _promptStartPos) {
|
||||
buffer(_promptEndPos) = ' ';
|
||||
_promptEndPos--;
|
||||
}
|
||||
}
|
||||
|
||||
void ConsoleDialog::killLine() {
|
||||
|
@ -493,8 +495,10 @@ void ConsoleDialog::killLastWord() {
|
|||
|
||||
for (int i = _currentPos; i < _promptEndPos; i++)
|
||||
buffer(i) = buffer(i + cnt);
|
||||
buffer(_promptEndPos) = ' ';
|
||||
_promptEndPos -= cnt;
|
||||
if (_promptEndPos > _promptStartPos) {
|
||||
buffer(_promptEndPos) = ' ';
|
||||
_promptEndPos -= cnt;
|
||||
}
|
||||
}
|
||||
|
||||
void ConsoleDialog::addToHistory(const char *str) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue