|
The cursor-positioning bug has been fixed in 0.17.0, and the same patch was applied to 0.16.0, according to the Changelog, but evidently not all of it made it into the source. I'm including the corresponding patch for 0.16.0, made against the source in tn5250-0.16.0.tar.gz, which I got from the CVS site. --Dave James David Rich wrote: > When I use PDM the cursor is positioned at the wrong field (the most > upper-left). When using "Work with Members Using PDM" it should be > positioned in the "Opt" column next to the first member. > > James Rich > james@eaerich.com
diff -u old/cursesterm.c ./cursesterm.c --- old/cursesterm.c Wed Dec 6 11:14:41 2000 +++ ./cursesterm.c Mon Dec 18 15:25:32 2000 @@ -1053,7 +1053,7 @@ /* Retreive all keys from the keyboard buffer. */ while (This->data->k_buf_len < MAX_K_BUF_LEN && (ch = getch ()) != ERR) { - TN5250_LOG(("curses_getch: recevied 0x%02X.\n", ch)); + TN5250_LOG(("curses_getch: received 0x%02X.\n", ch)); /* FIXME: Here would be the proper place to get mouse events :) */ diff -u old/session.c ./session.c --- old/session.c Wed Dec 6 11:14:41 2000 +++ ./session.c Mon Dec 18 16:00:58 2000 @@ -496,7 +496,6 @@ int cur_command; TN5250_LOG(("ProcessStream: entered.\n")); - tn5250_display_clear_pending_insert (This->display); while (!tn5250_record_is_chain_end(This->record)) { cur_command = tn5250_record_get_byte(This->record); @@ -541,7 +540,6 @@ case CMD_RESTORE_SCREEN: /* Ignored, the data following this should be a valid * Write To Display command. */ - tn5250_session_clear_unit(This); break; case CMD_WRITE_ERROR_CODE: tn5250_session_write_error_code(This); @@ -717,7 +715,9 @@ int old_x = tn5250_display_cursor_x(This->display); int old_y = tn5250_display_cursor_y(This->display); int is_x_system; - + int will_be_unlocked; + int cur_opcode; + TN5250_LOG(("WriteToDisplay: entered.\n")); CC1 = tn5250_record_get_byte(This->record); @@ -818,9 +818,12 @@ is_x_system = tn5250_display_indicators(This->display) & TN5250_DISPLAY_IND_X_SYSTEM; + will_be_unlocked = ((CC2 & TN5250_SESSION_CTL_UNLOCK) != 0); + cur_opcode = tn5250_record_opcode(This->record); if (end_y != 0xff && end_x != 0xff) tn5250_display_set_cursor(This->display, end_y, end_x); - else if(is_x_system) { + else if((is_x_system && will_be_unlocked) || + cur_opcode == TN5250_RECORD_OPCODE_RESTORE_SCR) { tn5250_display_set_cursor_home (This->display); } else { tn5250_display_set_cursor(This->display, old_y, old_x);
As an Amazon Associate we earn from qualifying purchases.
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.