summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2013-10-23 19:07:17 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2013-10-23 19:07:17 +0200
commit0299cda7a9f4bfd54918fd2806626baba3de0c37 (patch)
tree0f85f265ec1127f9e88ba77a41638c0945ec9f66
parentd3be9427ce35b9967b0be63e009f739334c79901 (diff)
screen: remove old cursor-drawing fallback
We used to not guarantee that all cells are allocated. Hence, we had to correctly draw the cursor if they weren't. These days we have this guarantee, though. So remove the old fallbacks. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
-rw-r--r--src/tsm_screen.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/tsm_screen.c b/src/tsm_screen.c
index 5a48b78..a23b28d 100644
--- a/src/tsm_screen.c
+++ b/src/tsm_screen.c
@@ -2005,7 +2005,6 @@ tsm_age_t tsm_screen_draw(struct tsm_screen *con, tsm_screen_draw_cb draw_cb,
struct line *iter, *line = NULL;
struct cell *cell;
struct tsm_screen_attr attr;
- bool cursor_done = false;
int ret, warned = 0;
const uint32_t *ch;
size_t len;
@@ -2085,12 +2084,9 @@ tsm_age_t tsm_screen_draw(struct tsm_screen *con, tsm_screen_draw_cb draw_cb,
}
}
- if (k == cur_y + 1 &&
- j == cur_x) {
- cursor_done = true;
- if (!(con->flags & TSM_SCREEN_HIDE_CURSOR))
- attr.inverse = !attr.inverse;
- }
+ if (k == cur_y + 1 && j == cur_x &&
+ !(con->flags & TSM_SCREEN_HIDE_CURSOR))
+ attr.inverse = !attr.inverse;
/* TODO: do some more sophisticated inverse here. When
* INVERSE mode is set, we should instead just select
@@ -2128,16 +2124,6 @@ tsm_age_t tsm_screen_draw(struct tsm_screen *con, tsm_screen_draw_cb draw_cb,
"suppressing further warnings during this rendering round");
}
}
-
- if (k == cur_y + 1 && !cursor_done) {
- cursor_done = true;
- if (!(con->flags & TSM_SCREEN_HIDE_CURSOR)) {
- if (!(con->flags & TSM_SCREEN_INVERSE))
- attr.inverse = !attr.inverse;
- draw_cb(con, 0, NULL, 0, 1,
- cur_x, i, &attr, 0, data);
- }
- }
}
if (con->age_reset) {