Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 63e5bb78c5a7539e59c866ebcb7f5c36 > files > 4

newt-0.52.6-5mdv2009.0.src.rpm

Index: newt.c
===================================================================
RCS file: /usr/local/CVS/newt/newt.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- newt.c	28 Feb 2007 17:35:01 -0000	1.75
+++ newt.c	11 Apr 2007 14:31:40 -0000	1.76
@@ -778,8 +778,13 @@
 }
 
 void newtGetrc(int * row, int * col) {
-   *row = cursorRow;
-   *col = cursorCol;
+    *row = cursorRow;
+    *col = cursorCol;
+
+    if (currentWindow) {
+	*row -= currentWindow->top;
+	*col -= currentWindow->left;
+    }
 }
 
 void newtGotorc(int newRow, int newCol) {