diff --git a/pygame_gui/core/text/text_box_layout_row.py b/pygame_gui/core/text/text_box_layout_row.py index 40e253e4..2ed968eb 100644 --- a/pygame_gui/core/text/text_box_layout_row.py +++ b/pygame_gui/core/text/text_box_layout_row.py @@ -368,7 +368,7 @@ def clear(self): """ if self.target_surface is not None and self.surf_row_dirty: slightly_wider_rect = pygame.Rect(self.x, self.y, - self.width + self.cursor_draw_width, + self.width + + self.layout.edit_cursor_width, self.height) self.target_surface.fill(pygame.Color('#00000000'), slightly_wider_rect) self.surf_row_dirty = False