mirror of
https://github.com/tmux/tmux.git
synced 2026-10-17 00:44:54 +00:00
Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master: Clear stale pane references correctly when respawning windows, GitHub issue 5757 from Alejandro Pacheco. Add a timeout for fuzzy matching, also some general tidying up. Don't bother working out width for fuzzy match without positions since it is not needed.
This commit is contained in:
12
format.c
12
format.c
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: format.c,v 1.430 2026/10/16 07:59:06 nicm Exp $ */
|
||||
/* $OpenBSD: format.c,v 1.431 2026/10/16 12:21:12 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -5102,11 +5102,13 @@ format_match_fuzzy(const char *pattern, const char *text, int positions)
|
||||
bitstr_t *bs;
|
||||
char *value;
|
||||
size_t size;
|
||||
u_int i, width;
|
||||
u_int i, width = 1;
|
||||
|
||||
width = format_width(text);
|
||||
if (width == 0)
|
||||
width = 1;
|
||||
if (positions) {
|
||||
width = format_width(text);
|
||||
if (width == 0)
|
||||
width = 1;
|
||||
}
|
||||
bs = fuzzy_match(pattern, text, width, NULL);
|
||||
if (bs == NULL)
|
||||
return (xstrdup(positions ? "" : "0"));
|
||||
|
||||
Reference in New Issue
Block a user