small console edition fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



this patch:
- adds the DEL key support in emacs line editing mode
- fix some tests for line being wider than the screen

A+
Name:          con_edit
ChangeLog:     better too long lines detection, added del key support in emacs mode
License:       X11
GenDate:       2002/06/01 19:02:49 UTC
ModifiedFiles: win32/editline.c
AddedFiles:    
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/win32/editline.c,v
retrieving revision 1.9
diff -u -u -r1.9 editline.c
--- win32/editline.c	31 May 2002 23:06:54 -0000	1.9
+++ win32/editline.c	1 Jun 2002 03:35:22 -0000
@@ -143,7 +143,7 @@
 
 static BOOL WCEL_Grow(WCEL_Context* ctx, size_t len)
 {
-    if (ctx->csbi.dwCursorPosition.X + ctx->ofs + len >= ctx->csbi.dwSize.X)
+    if (ctx->csbi.dwCursorPosition.X + ctx->len + len >= ctx->csbi.dwSize.X)
     {
 	FIXME("Current implementation doesn't allow edition to spray across several lines\n");
 	return FALSE;
@@ -201,10 +201,8 @@
     WCHAR	buffer[2];
 
     /* do not insert 0..31 control characters */
-    if (c < ' ')
-    {
-	if (c != '\t') return;
-    }
+    if (c < ' ' && c != '\t') return;
+
     buffer[0] = c;
     buffer[1] = 0;
     WCEL_InsertString(ctx, buffer);
@@ -637,11 +635,12 @@
 {
     {/*RETURN*/  0x0d,	WCEL_Done },
     {/*VK_PRIOR*/0x21, 	WCEL_MoveToPrevHist	},
-    {/*VK_NEXT*/0x22,	WCEL_MoveToNextHist 	},
+    {/*VK_NEXT*/ 0x22,	WCEL_MoveToNextHist 	},
     {/*VK_END*/  0x23,	WCEL_MoveToEnd		},
     {/*VK_HOME*/ 0x24,	WCEL_MoveToBeg		},
     {/*VK_RIGHT*/0x27,	WCEL_MoveRight 		},
-    {/*VK_LEFT*/0x25,	WCEL_MoveLeft 		},
+    {/*VK_LEFT*/ 0x25,	WCEL_MoveLeft 		},
+    {/*VK_DEL*/  0x2e,  WCEL_DeleteCurrChar     },
     {	0,		NULL 			}
 };
 

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux