Scott Klement wrote:

> Over the past year or so, I noticed that the END key doesn't always
> position the cursor where I expect it to...   However, I never noticed
> the pattern behind the problem -- until today.
> 
> It happens when you type a line, then delete some of the data in the
> field, then press the end key.
> 
> Looking at the code, I see that in display.c, the tn5250_display_kf_end
> routine determines the end of the string by checking if the last character
> of the string is '\0'.   If it is, it backs up through the string til it
> finds the last non-0x00 character. 
> 
> However, in the tn5250_dbuffer_del() routine, when a character is deleted,
> it places a 0x40 at end of the string to keep the length constant.
> Because the end of the string is now 0x40 instead of 0x00, the cursor
> does not position correctly.
> 
> Here's a patch -- please check it for correctness, and if possible,
> commit it.   Thanks!
> 
> 
> 
> --- dbuffer.c.orig      Thu Jun  8 12:45:34 2000
> +++ dbuffer.c   Mon Nov  6 17:50:47 2000
> @@ -562,7 +562,7 @@
>        x = fwdx;
>        y = fwdy;
>     }
> -   This->data[y * This->w + x] = 0x40;
> +   This->data[y * This->w + x] = 0x00;
>  
>     ASSERT_VALID(This);
>  }
> 
> 
Applied (both stable and devel branches).

-Jay 'Eraserhead' Felice

+---
| This is the LINUX5250 Mailing List!
| To submit a new message, send your mail to [EMAIL PROTECTED]
| To subscribe to this list send email to [EMAIL PROTECTED]
| To unsubscribe from this list send email to [EMAIL PROTECTED]
| Questions should be directed to the list owner/operator: [EMAIL PROTECTED]
+---

Reply via email to