mirror of
https://github.com/tmux/tmux.git
synced 2026-10-07 02:04:22 +00:00
Ignore Ms if it is invalid (for example no %p1) and report in client
mode, GitHub issue 5460.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: window-client.c,v 1.47 2026/07/14 17:17:18 nicm Exp $ */
|
||||
/* $OpenBSD: window-client.c,v 1.48 2026/08/05 08:54:56 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2017 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -113,14 +113,16 @@ static const char *window_client_info_lines[] = {
|
||||
"#{?#{I/c:kmous},,#[align=right]unavailable: [kmous] missing}",
|
||||
|
||||
"#[fg=themelightgrey]set-clipboard #[#{E:tree-mode-border-style},acs]x#[default] "
|
||||
"#{?#{!=:#{set-clipboard},off},#{?#{I/f:clipboard},,"
|
||||
"#{?#{!=:#{set-clipboard},off},#{?#{I/c:Ms},,"
|
||||
"#[fg=themered]}#{set-clipboard},#[fg=themelightgrey]off} "
|
||||
"#{?#{I/f:clipboard},,#[align=right]unavailable: [Ms] missing}",
|
||||
"#{?#{I/c:Ms},,#[align=right]unavailable: [Ms] "
|
||||
"#{?clipboard_invalid,invalid,missing}}",
|
||||
|
||||
"#[fg=themelightgrey]get-clipboard #[#{E:tree-mode-border-style},acs]x#[default] "
|
||||
"#{?#{!=:#{get-clipboard},off},#{?#{I/f:clipboard},,"
|
||||
"#{?#{!=:#{get-clipboard},off},#{?#{I/c:Ms},,"
|
||||
"#[fg=themered]}#{get-clipboard},#[fg=themelightgrey]off} "
|
||||
"#{?#{I/f:clipboard},,#[align=right]unavailable: [Ms] missing}",
|
||||
"#{?#{I/c:Ms},,#[align=right]unavailable: [Ms] "
|
||||
"#{?clipboard_invalid,invalid,missing}}",
|
||||
|
||||
"#[fg=themelightgrey]focus-events #[#{E:tree-mode-border-style},acs]x#[default] "
|
||||
"#{?focus-events,#{?#{I/f:focus},,#[fg=themered]}on,#[fg=themelightgrey]off} "
|
||||
@@ -273,6 +275,10 @@ window_client_draw_info(__unused void *modedata, void *itemdata,
|
||||
char *expanded;
|
||||
|
||||
ft = format_create_defaults(NULL, c, NULL, NULL, NULL);
|
||||
if (c->tty.term->flags & TERM_INVALIDMS)
|
||||
format_add(ft, "clipboard_invalid", "1");
|
||||
else
|
||||
format_add(ft, "clipboard_invalid", "0");
|
||||
|
||||
screen_write_cursormove(ctx, cx, cy, 0);
|
||||
for (i = 0; i < nitems(window_client_info_lines); i++) {
|
||||
|
||||
Reference in New Issue
Block a user