diff --git a/input.c b/input.c index 91e3401ce..202a7c9f2 100644 --- a/input.c +++ b/input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: input.c,v 1.277 2026/10/14 16:23:43 nicm Exp $ */ +/* $OpenBSD: input.c,v 1.278 2026/10/16 11:34:49 bket Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -826,7 +826,6 @@ input_start_ground_timer(struct input_ctx *ictx) { struct timeval tv = { .tv_sec = 5, .tv_usec = 0 }; - event_del(&ictx->ground_timer); event_add(&ictx->ground_timer, &tv); } @@ -3588,7 +3587,6 @@ input_start_request_timer(struct input_ctx *ictx) { struct timeval tv = { .tv_sec = 0, .tv_usec = 100000 }; - event_del(&ictx->request_timer); event_add(&ictx->request_timer, &tv); } diff --git a/screen-write.c b/screen-write.c index ded526217..c48a8da03 100644 --- a/screen-write.c +++ b/screen-write.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen-write.c,v 1.302 2026/10/16 07:59:06 nicm Exp $ */ +/* $OpenBSD: screen-write.c,v 1.303 2026/10/16 11:33:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1633,39 +1633,12 @@ screen_write_insertline(struct screen_write_ctx *ctx, u_int ny, u_int bg) struct screen *s = ctx->s; struct grid *gd = s->grid; struct tty_ctx ttyctx; - u_int sy = screen_size_y(s); if (ny == 0) ny = 1; - if (s->cy < s->rupper || s->cy > s->rlower) { - if (ny > sy - s->cy) - ny = sy - s->cy; - if (ny == 0) - return; - - screen_write_initctx(ctx, &ttyctx, 1, 1); - ttyctx.bg = bg; - -#ifdef ENABLE_IMAGES - image_redraw_area(ctx, 0, s->cy, screen_size_x(s), sy - s->cy); -#endif - - grid_view_insert_lines(gd, s->cy, ny, bg); - - screen_write_collect_flush(ctx, 0, __func__); - ttyctx.n = ny; - - if (!screen_write_should_draw_lines(ctx, s->cy, sy - s->cy)) - return; - if (~ttyctx.flags & TTY_CTX_PANE_OBSCURED || ctx->wp == NULL) { - tty_write(tty_cmd_insertline, &ttyctx); - return; - } - - screen_write_redraw_pane(ctx, &ttyctx); + if (s->cy < s->rupper || s->cy > s->rlower) return; - } if (ny > s->rlower + 1 - s->cy) ny = s->rlower + 1 - s->cy; @@ -1675,15 +1648,7 @@ screen_write_insertline(struct screen_write_ctx *ctx, u_int ny, u_int bg) screen_write_initctx(ctx, &ttyctx, 1, 1); ttyctx.bg = bg; -#ifdef ENABLE_IMAGES - image_redraw_area(ctx, 0, s->cy, screen_size_x(s), - s->rlower + 1 - s->cy); -#endif - - if (s->cy < s->rupper || s->cy > s->rlower) - grid_view_insert_lines(gd, s->cy, ny, bg); - else - grid_view_insert_lines_region(gd, s->rlower, s->cy, ny, bg); + grid_view_insert_lines_region(gd, s->rlower, s->cy, ny, bg); screen_write_collect_flush(ctx, 0, __func__); ttyctx.n = ny; @@ -1705,40 +1670,13 @@ screen_write_deleteline(struct screen_write_ctx *ctx, u_int ny, u_int bg) struct screen *s = ctx->s; struct grid *gd = s->grid; struct tty_ctx ttyctx; - u_int sy = screen_size_y(s), ry; + u_int ry; if (ny == 0) ny = 1; - if (s->cy < s->rupper || s->cy > s->rlower) { - if (ny > sy - s->cy) - ny = sy - s->cy; - if (ny == 0) - return; - - screen_write_initctx(ctx, &ttyctx, 1, 1); - ttyctx.bg = bg; - -#ifdef ENABLE_IMAGES - image_redraw_area(ctx, 0, s->cy, screen_size_x(s), sy - s->cy); -#endif - - grid_view_delete_lines(gd, s->cy, ny, bg); - - screen_write_collect_flush(ctx, 0, __func__); - ttyctx.n = ny; - - ry = s->rlower + 1 - s->rupper; - if (!screen_write_should_draw_lines(ctx, s->rupper, ry)) - return; - if (~ttyctx.flags & TTY_CTX_PANE_OBSCURED || ctx->wp == NULL) { - tty_write(tty_cmd_deleteline, &ttyctx); - return; - } - - screen_write_redraw_pane(ctx, &ttyctx); + if (s->cy < s->rupper || s->cy > s->rlower) return; - } ry = s->rlower + 1 - s->cy; if (ny > ry) @@ -1749,14 +1687,7 @@ screen_write_deleteline(struct screen_write_ctx *ctx, u_int ny, u_int bg) screen_write_initctx(ctx, &ttyctx, 1, 1); ttyctx.bg = bg; -#ifdef ENABLE_IMAGES - image_redraw_area(ctx, 0, s->cy, screen_size_x(s), ry); -#endif - - if (s->cy < s->rupper || s->cy > s->rlower) - grid_view_delete_lines(gd, s->cy, ny, bg); - else - grid_view_delete_lines_region(gd, s->rlower, s->cy, ny, bg); + grid_view_delete_lines_region(gd, s->rlower, s->cy, ny, bg); screen_write_collect_flush(ctx, 0, __func__); ttyctx.n = ny; diff --git a/server-client.c b/server-client.c index b819d32d4..07995c821 100644 --- a/server-client.c +++ b/server-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-client.c,v 1.523 2026/10/16 07:59:06 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.524 2026/10/16 11:34:49 bket Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -1092,7 +1092,6 @@ have_event: log_debug("click timer started"); tv.tv_sec = KEYC_CLICK_TIMEOUT / 1000; tv.tv_usec = (KEYC_CLICK_TIMEOUT % 1000) * 1000L; - evtimer_del(&c->click_timer); evtimer_add(&c->click_timer, &tv); } } @@ -1572,7 +1571,6 @@ try_again: tv.tv_sec = repeat / 1000; tv.tv_usec = (repeat % 1000) * 1000L; - evtimer_del(&c->repeat_timer); evtimer_add(&c->repeat_timer, &tv); } else { c->flags &= ~CLIENT_REPEAT; diff --git a/tty.c b/tty.c index 739312937..929d5a8f2 100644 --- a/tty.c +++ b/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.491 2026/10/16 07:59:06 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.492 2026/10/16 11:34:49 bket Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -337,7 +337,6 @@ tty_start_start_timer(struct tty *tty) struct timeval tv = { .tv_sec = TTY_QUERY_TIMEOUT }; log_debug("%s: start timer started", c->name); - evtimer_del(&tty->start_timer); evtimer_add(&tty->start_timer, &tv); } diff --git a/window.c b/window.c index 71f8a0c9d..e290bb1f7 100644 --- a/window.c +++ b/window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.386 2026/10/13 10:21:58 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.387 2026/10/16 11:34:49 bket Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -2719,7 +2719,6 @@ window_pane_scrollbar_start_timer(struct window_pane *wp) "pane-scrollbars-timeout"); tv.tv_sec = delay / 1000; tv.tv_usec = (delay % 1000) * 1000L; - evtimer_del(&wp->sb_auto_timer); evtimer_add(&wp->sb_auto_timer, &tv); }