Hi folks,
I caught a bug in forward (and backward) motion to a target character [1].
The motion appears to be out of place.
I reproduced the bug in both Arch Linux package with Screen version 5.0.1,
and the build from the master branch (tag 5.0.0,
9d8b0ff3901bdcb8d3bc05d94fce2ef987562768).
I found a fix in [2].
[1] https://www.gnu.org/software/screen/manual/html_node/Movement.html
[2] attachment
Thanks,
Guang
diff --git a/src/mark.c b/src/mark.c
index 685429f..8d384a8 100644
--- a/src/mark.c
+++ b/src/mark.c
@@ -131,19 +131,19 @@ static int lineend(int y)
*
* Returns -1 if the target doesn't appear num times, 0 otherwise.
*/
-static int nextchar(int *xp, int *yp, int direction, char target, int num)
+static int nextchar(int *xp, int *yp, int direction, unsigned char target, int num)
{
int width; /* width of the current window. */
int x; /* x coordinate of the current cursor position. */
int step; /* amount to increment x (+1 or -1) */
int adjust; /* Final adjustment of cursor position. */
- char *displayed_line; /* Line in which search takes place. */
+ uint32_t *displayed_line; /* Line in which search takes place. */
x = *xp;
step = 1;
adjust = 0;
width = fore->w_width;
- displayed_line = (char *)WIN(*yp)->image;
+ displayed_line = WIN(*yp)->image;
switch (direction) {
case 't':