mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Do not crash when calling choose-tree with a command that changes the mode.
This commit is contained in:
12
cmd.c
12
cmd.c
@ -1222,14 +1222,14 @@ cmd_find_pane_offset(const char *paneptr, struct winlink *wl)
|
||||
|
||||
/* Replace the first %% or %idx in template by s. */
|
||||
char *
|
||||
cmd_template_replace(char *template, const char *s, int idx)
|
||||
cmd_template_replace(const char *template, const char *s, int idx)
|
||||
{
|
||||
char ch;
|
||||
char *buf, *ptr;
|
||||
int replaced;
|
||||
size_t len;
|
||||
char ch, *buf;
|
||||
const char *ptr;
|
||||
int replaced;
|
||||
size_t len;
|
||||
|
||||
if (strstr(template, "%") == NULL)
|
||||
if (strchr(template, '%') == NULL)
|
||||
return (xstrdup(template));
|
||||
|
||||
buf = xmalloc(1);
|
||||
|
Reference in New Issue
Block a user