[Scummvm-cvs-logs] CVS: scummvm/gui EditTextWidget.cpp,1.9,1.10

Oliver Kiehl olki at users.sourceforge.net
Mon May 5 02:49:08 CEST 2003


Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv8165/gui

Modified Files:
	EditTextWidget.cpp 
Log Message:
patch #732184


Index: EditTextWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/EditTextWidget.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- EditTextWidget.cpp	6 Mar 2003 21:45:33 -0000	1.9
+++ EditTextWidget.cpp	5 May 2003 09:48:23 -0000	1.10
@@ -67,13 +67,16 @@
 			break;
 		case 27:	// escape
 			_label = _backupString;
+			if (_pos >= _label.size())
+				_pos = _label.size() - 1;
 			_boss->releaseFocus();
 			dirty = true;
 			break;
 		case 8:		// backspace
-			_label.deleteLastChar();
-			if (_pos > 0)
+			if (_pos > 0) {
 				_pos--;
+				_label.deleteChar(_pos);
+			}
 			dirty = true;
 			break;
 		case 127:	// delete
@@ -87,7 +90,6 @@
 		case 256 + 19:	// right arrow
 			if (_pos < _label.size())
 				_pos++;
-			break;
 			break;
 		case 256 + 22:	// home
 			_pos = 0;





More information about the Scummvm-git-logs mailing list