summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadrul Habib Chowdhury <sadrul@users.sourceforge.net>2009-12-17 13:11:56 -0500
committerSadrul Habib Chowdhury <sadrul@users.sourceforge.net>2009-12-17 13:11:56 -0500
commit71cd5c06c6b87547c3cb9f1274bc62b810f43565 (patch)
tree40c17958f39741eaf16ec79e3b3fccbdc95b342b
parentd11bdb4fdd5b12dc57cb62d22eafb719f55ecd38 (diff)
downloadscreen-71cd5c06c6b87547c3cb9f1274bc62b810f43565.tar.gz
Fix cursor positioning after a search in copy mode
The problem would show up with splits (both vertical and horizontal), because the layer wouldn't remember the position the cursor was moved to, and when screen refreshes the regions (if there's more than one), it takes the cursor to the old position. The fix is to simply remember the cursor position in the layer.
-rw-r--r--src/mark.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mark.c b/src/mark.c
index 83eaed1..c90201f 100644
--- a/src/mark.c
+++ b/src/mark.c
@@ -1155,6 +1155,8 @@ int tx, ty, line;
if (markdata->second == 0)
{
+ flayer->l_x = tx;
+ flayer->l_y = W2D(ty);
LGotoPos(flayer, tx, W2D(ty));
return;
}
@@ -1251,6 +1253,8 @@ int tx, ty, line;
#endif
}
}
+ flayer->l_x = tx;
+ flayer->l_y = W2D(ty);
LGotoPos(flayer, tx, W2D(ty));
}