From f2a6be45cdbfde12e4eabb73f5d6dc9497c03bdc Mon Sep 17 00:00:00 2001 From: William McBrine Date: Fri, 28 Jul 2006 19:32:07 +0000 Subject: [PATCH] The cursor position was not updated correctly in BIOS mode. Solution: always move the cursor in doupdate(), as long as it's visible. This also lets me remove the cursor update from X's PDC_transform_line(). To Do: Cursor must be updated in curs_set on an invisible -> visible transition. --- pdcurses/refresh.c | 11 +++++------ x11/pdcdisp.c | 6 +----- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/pdcurses/refresh.c b/pdcurses/refresh.c index 10e5d0e4..f7bd94f4 100644 --- a/pdcurses/refresh.c +++ b/pdcurses/refresh.c @@ -38,7 +38,7 @@ # undef reset_prog_mode #endif -RCSID("$Id: refresh.c,v 1.33 2006/07/17 21:45:15 wmcbrine Exp $"); +RCSID("$Id: refresh.c,v 1.34 2006/07/28 19:32:07 wmcbrine Exp $"); /*man-start************************************************************** @@ -216,12 +216,11 @@ int doupdate(void) curscr->_clear = FALSE; - if (SP->cursrow != curscr->_cury || SP->curscol != curscr->_curx) - { + if (SP->visibility) PDC_gotoyx(curscr->_cury, curscr->_curx); - SP->cursrow = curscr->_cury; - SP->curscol = curscr->_curx; - } + + SP->cursrow = curscr->_cury; + SP->curscol = curscr->_curx; return OK; } diff --git a/x11/pdcdisp.c b/x11/pdcdisp.c index 91f40989..842ac451 100644 --- a/x11/pdcdisp.c +++ b/x11/pdcdisp.c @@ -19,7 +19,7 @@ #include -RCSID("$Id: pdcdisp.c,v 1.30 2006/07/23 19:10:32 wmcbrine Exp $"); +RCSID("$Id: pdcdisp.c,v 1.31 2006/07/28 19:32:07 wmcbrine Exp $"); int PDC_display_cursor(int oldrow, int oldcol, int newrow, int newcol, int visibility) @@ -135,8 +135,4 @@ void PDC_transform_line(int lineno) curscr->_lastch[lineno] = _NO_CHANGE; XCursesInstructAndWait(CURSES_REFRESH); - - if (lineno == SP->cursrow) - PDC_display_cursor(SP->cursrow, SP->curscol, - SP->cursrow, SP->curscol, 1); }