mirror of
https://github.com/tmux/tmux.git
synced 2026-10-10 04:04:27 +00:00
Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master: Add commands to copy mode to select, pipe and open OSC 133 command output, from Michael Grant. Fix bugs with empty panes and load-buffer -w, GitHub issue 5701 from Alexandre Fiori. Track allocations in yacc to avoid leaking when parsing commands, GitHub issue 5632 from Jeong, Heon. Fix commands being lost when chained with assignment, GitHub issue 5702 from Jeong, Heon
This commit is contained in:
10
spawn.c
10
spawn.c
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: spawn.c,v 1.55 2026/10/07 12:55:41 nicm Exp $ */
|
||||
/* $OpenBSD: spawn.c,v 1.57 2026/10/08 07:50:05 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -460,6 +460,8 @@ spawn_pane(struct spawn_context *sc, char **cause)
|
||||
/* If the command is empty, don't fork a child process. */
|
||||
if (sc->flags & SPAWN_EMPTY) {
|
||||
new_wp->flags |= PANE_EMPTY;
|
||||
new_wp->pid = 0;
|
||||
*new_wp->tty = '\0';
|
||||
new_wp->base.mode &= ~MODE_CURSOR;
|
||||
new_wp->base.mode |= MODE_CRLF;
|
||||
goto complete;
|
||||
@@ -703,7 +705,7 @@ spawn_editor_finish(struct window_pane *wp)
|
||||
|
||||
struct spawn_editor_state *
|
||||
spawn_editor(struct client *c, const char *buf, size_t len,
|
||||
spawn_finish_edit_cb cb, void *arg)
|
||||
const char *editor, spawn_finish_edit_cb cb, void *arg)
|
||||
{
|
||||
struct spawn_editor_state *es;
|
||||
struct spawn_context sc = { 0 };
|
||||
@@ -717,13 +719,13 @@ spawn_editor(struct client *c, const char *buf, size_t len,
|
||||
FILE *f;
|
||||
char *cmd, *cause = NULL;
|
||||
char path[] = _PATH_TMP "tmux.XXXXXXXX";
|
||||
const char *editor;
|
||||
int fd;
|
||||
|
||||
if (w->modal != NULL)
|
||||
return (NULL);
|
||||
|
||||
editor = options_get_string(global_options, "editor");
|
||||
if (editor == NULL)
|
||||
editor = options_get_string(global_options, "editor");
|
||||
fd = mkstemp(path);
|
||||
if (fd == -1)
|
||||
return (NULL);
|
||||
|
||||
Reference in New Issue
Block a user