× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: END key problems after deleting a char...
  • From: Scott Klement <klemscot@xxxxxxxxxxxx>
  • Date: Mon, 6 Nov 2000 17:57:38 -0600 (CST)


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);
 }


+---
| This is the LINUX5250 Mailing List!
| To submit a new message, send your mail to LINUX5250@midrange.com.
| To subscribe to this list send email to LINUX5250-SUB@midrange.com.
| To unsubscribe from this list send email to LINUX5250-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.