aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--grid.c4
-rw-r--r--screen-write.c4
-rw-r--r--tmux.h4
3 files changed, 8 insertions, 4 deletions
diff --git a/grid.c b/grid.c
index 2437e2ea..06a82522 100644
--- a/grid.c
+++ b/grid.c
@@ -1391,7 +1391,9 @@ grid_line_length(struct grid *gd, u_int py)
px = gd->sx;
while (px > 0) {
grid_get_cell(gd, px - 1, py, &gc);
- if (gc.data.size != 1 || *gc.data.data != ' ')
+ if ((gc.flags & GRID_FLAG_PADDING) ||
+ gc.data.size != 1 ||
+ *gc.data.data != ' ')
break;
px--;
}
diff --git a/screen-write.c b/screen-write.c
index 9571cbec..062a2929 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -184,10 +184,10 @@ screen_write_initctx(struct screen_write_ctx *ctx, struct tty_ctx *ttyctx,
}
if (ctx->wp != NULL &&
- !ctx->sync &&
+ (~ctx->flags & SCREEN_WRITE_SYNC) &&
(sync || ctx->wp != ctx->wp->window->active)) {
tty_write(tty_cmd_syncstart, ttyctx);
- ctx->sync = 1;
+ ctx->flags |= SCREEN_WRITE_SYNC;
}
}
diff --git a/tmux.h b/tmux.h
index 3bd37f05..921a51f9 100644
--- a/tmux.h
+++ b/tmux.h
@@ -796,7 +796,9 @@ typedef void (*screen_write_init_ctx_cb)(struct screen_write_ctx *,
struct screen_write_ctx {
struct window_pane *wp;
struct screen *s;
- int sync;
+
+ int flags;
+#define SCREEN_WRITE_SYNC 0x1
screen_write_init_ctx_cb init_ctx_cb;
void *arg;