Add e key to open editor to customize mode (like buffer mode) and a key

to show only changed items.
This commit is contained in:
nicm
2026-07-13 22:03:08 +00:00
committed by tmux update bot
parent 2a75cc2236
commit 09d5977263
4 changed files with 954 additions and 102 deletions

15
hooks.c
View File

@@ -1,4 +1,4 @@
/* $OpenBSD: hooks.c,v 1.13 2026/07/10 15:20:06 nicm Exp $ */
/* $OpenBSD: hooks.c,v 1.14 2026/07/13 22:03:08 nicm Exp $ */
/*
* Copyright (c) 2026 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -264,6 +264,19 @@ hooks_add_event(const char *name)
TAILQ_INSERT_TAIL(&hooks_events, he, entry);
}
/* Return if a hook event sink exists. */
int
hooks_is_event(const char *name)
{
struct hooks_event *he;
TAILQ_FOREACH(he, &hooks_events, entry) {
if (strcmp(he->name, name) == 0)
return (1);
}
return (0);
}
/* Return if an event name can be fired through the hooks path. */
int
hooks_valid_event_name(const char *name)

3
tmux.1
View File

@@ -1,4 +1,4 @@
.\" $OpenBSD: tmux.1,v 1.1137 2026/07/13 16:30:28 nicm Exp $
.\" $OpenBSD: tmux.1,v 1.1138 2026/07/13 22:03:08 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
.\"
@@ -3087,6 +3087,7 @@ The following keys may be used in customize mode:
.It Li "w" Ta "Set window option value, if option is for pane and window"
.It Li "d" Ta "Set an option or key to the default"
.It Li "D" Ta "Set tagged options and tagged keys to the default"
.It Li "e" Ta "Open the value in an editor"
.It Li "u" Ta "Unset an option (set to default value if global) or unbind a key"
.It Li "U" Ta "Unset tagged options and unbind tagged keys"
.It Li "C\-s" Ta "Search by name"

3
tmux.h
View File

@@ -1,4 +1,4 @@
/* $OpenBSD: tmux.h,v 1.1401 2026/07/13 16:07:47 nicm Exp $ */
/* $OpenBSD: tmux.h,v 1.1402 2026/07/13 22:03:08 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -2709,6 +2709,7 @@ char *format_trim_right(const char *, u_int);
/* hooks.c */
void hooks_add_event(const char *);
int hooks_is_event(const char *);
int hooks_valid_event_name(const char *);
void hooks_build_events(void);
void hooks_run(struct cmdq_item *, const char *);

File diff suppressed because it is too large Load Diff