Skip to content

Commit

Permalink
- reverted the last change which was just done in a hurry and didn't …
Browse files Browse the repository at this point in the history
…properly

  fix the cursor trailing. The actual problem was that with revision 1.12 of
  that file itix overlooked that he missing the negating "!" mark for the
  anti aliased check. Now the bug should hopefully be fixed forever ;)
  • Loading branch information
jens-maus committed Aug 1, 2005
1 parent 815be97 commit 15b90d4
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions mcc/MixedFunctions.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#ifdef __MORPHOS__
#define IS_ANTIALIASED(x) (1)
#else
#define IS_ANTIALIASED(x) ((x)->tf_Style & FSF_ANTIALIASED)
#define IS_ANTIALIASED(x) (((x)->tf_Style & FSF_ANTIALIASED) == FSF_ANTIALIASED)
#endif

/*************************************************************************/
Expand Down Expand Up @@ -378,7 +378,7 @@ void SetCursor(LONG x, struct line_node *line, long Set, struct InstData *data)
yplace = data->ypos + (data->height * (line_nr + pos.lines - 1));
cursorxplace = xplace + TextLength(data->rport, line->line.Contents+(x+start), 0-start);

/* if font is anti aliased, clear area near the cursor first */
// if font is anti aliased, clear area near the cursor first
if(IS_ANTIALIASED(data->font))
{
DoMethod(data->object, MUIM_DrawBackground, xplace, yplace,
Expand All @@ -396,12 +396,15 @@ void SetCursor(LONG x, struct line_node *line, long Set, struct InstData *data)
}
else
{
// Clear the place of the cursor, if not already done
DoMethod(data->object, MUIM_DrawBackground, cursorxplace, yplace,
cursor_width, data->height,
cursorxplace - ((data->flags & FLG_InVGrp) ? data->xpos : 0),
((data->flags & FLG_InVGrp) ? 0 : data->realypos) + data->height*(data->visual_y+line_nr+pos.lines-2),
0);
// Clear the place of the cursor in case we are using NO anti-aliased font
if(IS_ANTIALIASED(data->font) == FALSE)
{
DoMethod(data->object, MUIM_DrawBackground, cursorxplace, yplace,
cursor_width, data->height,
cursorxplace - ((data->flags & FLG_InVGrp) ? data->xpos : 0),
((data->flags & FLG_InVGrp) ? 0 : data->realypos) + data->height*(data->visual_y+line_nr+pos.lines-2),
0);
}
}

SetDrMd(data->rport, JAM1);
Expand Down

0 comments on commit 15b90d4

Please sign in to comment.