mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 21:21:05 +00:00
fix killLastWord
svn-id: r9896
This commit is contained in:
parent
898bbc85d0
commit
2a89cd9c9d
@ -349,13 +349,16 @@ void ConsoleDialog::killLine() {
|
||||
void ConsoleDialog::killLastWord() {
|
||||
int pos;
|
||||
int cnt = 0;
|
||||
bool space = true;
|
||||
while (_currentPos > _promptStartPos) {
|
||||
_currentPos--;
|
||||
pos = getBufferPos();
|
||||
if (_buffer[pos] != ' ')
|
||||
cnt++;
|
||||
else
|
||||
break;
|
||||
if (_buffer[pos-1] == ' ') {
|
||||
if (!space)
|
||||
break;
|
||||
} else
|
||||
space = false;
|
||||
_currentPos--;
|
||||
cnt++;
|
||||
}
|
||||
|
||||
for (int i = _currentPos; i < _promptEndPos; i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user