diff options
| -rw-r--r-- | gui/console.cpp | 13 | 
1 files changed, 8 insertions, 5 deletions
diff --git a/gui/console.cpp b/gui/console.cpp index 48a370c82c..a5c71dffc4 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -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++)  | 
