In my revamp of cursor handling I had assumed that you were supposed
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Wed, 22 Dec 2004 10:21:50 +0000 (10:21 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Wed, 22 Dec 2004 10:21:50 +0000 (10:21 +0000)
to call _either_ do_text() _or_ do_cursor() on a given character
cell. In fact you're supposed to call do_text() no matter what, and
then call do_cursor() as well if it's got the cursor on it, since
do_cursor() _only_ draws the actual cursor, which often doesn't also
cause the text to get drawn.

I'm half tempted to change this in the interface, retire do_cursor()
as an external function and relegate it to an internal function in
each front end, and require that do_text() must fully process all
cursor attributes it is passed. However, I haven't done this yet.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5017 cda61777-01e9-0310-a592-d414129be87e

terminal.c

index ea5f503..25fb81e 100644 (file)
@@ -4830,12 +4830,11 @@ static void do_paint(Terminal *term, Context ctx, int may_optimise)
 
            if (break_run) {
                if ((dirty_run || last_run_dirty) && ccount > 0) {
+                   do_text(ctx, start, i, ch, ccount, attr,
+                           ldata->lattr);
                    if (attr & (TATTR_ACTCURS | TATTR_PASCURS))
-                       do_cursor(ctx, our_curs_x, i, ch, ccount, attr,
+                       do_cursor(ctx, start, i, ch, ccount, attr,
                                  ldata->lattr);
-                   else
-                       do_text(ctx, start, i, ch, ccount, attr,
-                               ldata->lattr);
 
                    updated_line = 1;
                }
@@ -4917,12 +4916,11 @@ static void do_paint(Terminal *term, Context ctx, int may_optimise)
            }
        }
        if (dirty_run && ccount > 0) {
+           do_text(ctx, start, i, ch, ccount, attr,
+                   ldata->lattr);
            if (attr & (TATTR_ACTCURS | TATTR_PASCURS))
-               do_cursor(ctx, our_curs_x, i, ch, ccount, attr,
+               do_cursor(ctx, start, i, ch, ccount, attr,
                          ldata->lattr);
-           else
-               do_text(ctx, start, i, ch, ccount, attr,
-                       ldata->lattr);
 
            updated_line = 1;
        }