]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
- fix cursor positioning when setting entry or checkbox flags
authormlichvar <mlichvar>
Wed, 11 Apr 2007 14:31:40 +0000 (14:31 +0000)
committermlichvar <mlichvar>
Wed, 11 Apr 2007 14:31:40 +0000 (14:31 +0000)
newt.c
newt.spec

diff --git a/newt.c b/newt.c
index 544558da889ac6c451b3e3b2e89eb2aaff0f811a..8b20dab097260435954745b72ff65dce38bf6e8a 100644 (file)
--- a/newt.c
+++ b/newt.c
@@ -778,8 +778,13 @@ void newtGetWindowPos(int * x, int * y) {
 }
 
 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) {
index 154ad10bba16557715e97bc3df7274bf129ad9a1..341ca94394aca3348ed4379d3396f2ce825b7248 100644 (file)
--- a/newt.spec
+++ b/newt.spec
@@ -88,6 +88,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libnewt.a
 
 %changelog
+- fix cursor positioning when setting entry or checkbox flags
 - fix entry scrolling (#234829)
 - fix multibyte character handling in entry