Dan Aloni in GitHub issue 3498.
-/* $OpenBSD: format.c,v 1.311 2023/02/07 10:21:01 nicm Exp $ */
+/* $OpenBSD: format.c,v 1.312 2023/03/27 08:47:57 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
return (NULL);
}
+/* Callback for pane_unseen_changes. */
+static void *
+format_cb_pane_unseen_changes(struct format_tree *ft)
+{
+ if (ft->wp != NULL) {
+ if (ft->wp->flags & PANE_UNSEENCHANGES)
+ return (xstrdup("1"));
+ return (xstrdup("0"));
+ }
+ return (NULL);
+}
+
/* Callback for pane_last. */
static void *
format_cb_pane_last(struct format_tree *ft)
{ "pane_tty", FORMAT_TABLE_STRING,
format_cb_pane_tty
},
+ { "pane_unseen_changes", FORMAT_TABLE_STRING,
+ format_cb_pane_unseen_changes
+ },
{ "pane_width", FORMAT_TABLE_STRING,
format_cb_pane_width
},
-/* $OpenBSD: input.c,v 1.213 2023/01/03 11:43:24 nicm Exp $ */
+/* $OpenBSD: input.c,v 1.214 2023/03/27 08:47:57 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
window_update_activity(wp->window);
wp->flags |= PANE_CHANGED;
+ /* Flag new input while in a mode. */
+ if (!TAILQ_EMPTY(&wp->modes))
+ wp->flags |= PANE_UNSEENCHANGES;
+
/* NULL wp if there is a mode set as don't want to update the tty. */
if (TAILQ_EMPTY(&wp->modes))
screen_write_start_pane(sctx, wp, &wp->base);
-.\" $OpenBSD: tmux.1,v 1.916 2023/02/07 10:21:01 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.917 2023/03/27 08:47:57 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
.\"
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: February 7 2023 $
+.Dd $Mdocdate: March 27 2023 $
.Dt TMUX 1
.Os
.Sh NAME
.It Li "pane_title" Ta "#T" Ta "Title of pane (can be set by application)"
.It Li "pane_top" Ta "" Ta "Top of pane"
.It Li "pane_tty" Ta "" Ta "Pseudo terminal of pane"
+.It Li "pane_unseen_changes" Ta "" Ta "1 if there were changes in pane while in mode"
.It Li "pane_width" Ta "" Ta "Width of pane"
.It Li "pid" Ta "" Ta "Server PID"
.It Li "rectangle_toggle" Ta "" Ta "1 if rectangle selection is activated"
-/* $OpenBSD: tmux.h,v 1.1194 2023/02/05 21:15:33 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.1195 2023/03/27 08:47:57 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
#define PANE_STATUSDRAWN 0x400
#define PANE_EMPTY 0x800
#define PANE_STYLECHANGED 0x1000
+#define PANE_UNSEENCHANGES 0x2000
int argc;
char **argv;
-/* $OpenBSD: window.c,v 1.284 2023/01/08 22:17:04 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.285 2023/03/27 08:47:57 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
next = TAILQ_FIRST(&wp->modes);
if (next == NULL) {
+ wp->flags &= ~PANE_UNSEENCHANGES;
log_debug("%s: no next mode", __func__);
wp->screen = &wp->base;
} else {