From: nicm Date: Sun, 4 Aug 2024 08:39:38 +0000 (+0000) Subject: Use paste_is_empty to check if there are no buffers since paste_get_top X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=00b011bc2193c5221f53457b48af622426769cc5;p=openbsd Use paste_is_empty to check if there are no buffers since paste_get_top will return NULL if there are no automatic buffers. --- diff --git a/usr.bin/tmux/window-buffer.c b/usr.bin/tmux/window-buffer.c index c677c646f78..28dcef5ec84 100644 --- a/usr.bin/tmux/window-buffer.c +++ b/usr.bin/tmux/window-buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-buffer.c,v 1.38 2024/03/21 11:32:49 nicm Exp $ */ +/* $OpenBSD: window-buffer.c,v 1.39 2024/08/04 08:39:38 nicm Exp $ */ /* * Copyright (c) 2017 Nicholas Marriott @@ -508,7 +508,7 @@ window_buffer_key(struct window_mode_entry *wme, struct client *c, struct window_buffer_itemdata *item; int finished; - if (paste_get_top(NULL) == NULL) { + if (paste_is_empty()) { finished = 1; goto out; } @@ -541,7 +541,7 @@ window_buffer_key(struct window_mode_entry *wme, struct client *c, } out: - if (finished || paste_get_top(NULL) == NULL) + if (finished || paste_is_empty()) window_pane_reset_mode(wp); else { mode_tree_draw(mtd);