mirror of https://github.com/OpenTTD/OpenTTD
(svn r24530) -Fix [#5203] (r24521): Ctrl+backspace/delete could remove too many characters (sbr)
parent
6e56b3abf8
commit
72639deb84
|
@ -111,10 +111,6 @@ bool Textbuf::DeleteChar(int delmode)
|
||||||
if (delmode == (WKC_CTRL | WKC_BACKSPACE) || delmode == (WKC_CTRL | WKC_DELETE)) {
|
if (delmode == (WKC_CTRL | WKC_BACKSPACE) || delmode == (WKC_CTRL | WKC_DELETE)) {
|
||||||
bool backspace = delmode == (WKC_CTRL | WKC_BACKSPACE);
|
bool backspace = delmode == (WKC_CTRL | WKC_BACKSPACE);
|
||||||
|
|
||||||
if (!CanDelChar(backspace)) return false;
|
|
||||||
|
|
||||||
/* Unconditionally delete one char to the left. */
|
|
||||||
this->DelChar(backspace);
|
|
||||||
if (!CanDelChar(backspace)) return false;
|
if (!CanDelChar(backspace)) return false;
|
||||||
WChar c = this->GetNextDelChar(backspace);
|
WChar c = this->GetNextDelChar(backspace);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue