mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-24 09:05:48 -04:00
Merge branch 'master' into releases/1.4
This commit is contained in:
commit
6b6db610cc
2 changed files with 18 additions and 6 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
* [Unreleased](#unreleased)
|
||||||
* [1.4.0](#1-4-0)
|
* [1.4.0](#1-4-0)
|
||||||
* [1.3.0](#1-3-0)
|
* [1.3.0](#1-3-0)
|
||||||
* [1.2.3](#1-2-3)
|
* [1.2.3](#1-2-3)
|
||||||
|
|
@ -8,6 +9,14 @@
|
||||||
* [1.2.0](#1-2-0)
|
* [1.2.0](#1-2-0)
|
||||||
|
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
### Added
|
||||||
|
### Deprecated
|
||||||
|
### Removed
|
||||||
|
### Fixed
|
||||||
|
### Security
|
||||||
|
|
||||||
|
|
||||||
## 1.4.0
|
## 1.4.0
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
||||||
15
input.c
15
input.c
|
|
@ -151,29 +151,32 @@ execute_binding(struct seat *seat, struct terminal *term,
|
||||||
|
|
||||||
struct pipe_context *ctx = NULL;
|
struct pipe_context *ctx = NULL;
|
||||||
|
|
||||||
|
int pipe_fd[2] = {-1, -1};
|
||||||
|
int stdout_fd = -1;
|
||||||
|
int stderr_fd = -1;
|
||||||
|
|
||||||
|
char *text = NULL;
|
||||||
|
size_t len = 0;
|
||||||
|
|
||||||
char *cmd = strdup(pipe_cmd);
|
char *cmd = strdup(pipe_cmd);
|
||||||
char **argv = NULL;
|
char **argv = NULL;
|
||||||
|
|
||||||
if (!tokenize_cmdline(cmd, &argv))
|
if (!tokenize_cmdline(cmd, &argv))
|
||||||
goto pipe_err;
|
goto pipe_err;
|
||||||
|
|
||||||
int pipe_fd[2] = {-1, -1};
|
|
||||||
if (pipe(pipe_fd) < 0) {
|
if (pipe(pipe_fd) < 0) {
|
||||||
LOG_ERRNO("failed to create pipe");
|
LOG_ERRNO("failed to create pipe");
|
||||||
goto pipe_err;
|
goto pipe_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
int stdout_fd = open("/dev/null", O_WRONLY);
|
stdout_fd = open("/dev/null", O_WRONLY);
|
||||||
int stderr_fd = open("/dev/null", O_WRONLY);
|
stderr_fd = open("/dev/null", O_WRONLY);
|
||||||
|
|
||||||
if (stdout_fd < 0 || stderr_fd < 0) {
|
if (stdout_fd < 0 || stderr_fd < 0) {
|
||||||
LOG_ERRNO("failed to open /dev/null");
|
LOG_ERRNO("failed to open /dev/null");
|
||||||
goto pipe_err;
|
goto pipe_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *text;
|
|
||||||
size_t len;
|
|
||||||
|
|
||||||
bool success = action == BIND_ACTION_PIPE_SCROLLBACK
|
bool success = action == BIND_ACTION_PIPE_SCROLLBACK
|
||||||
? term_scrollback_to_text(term, &text, &len)
|
? term_scrollback_to_text(term, &text, &len)
|
||||||
: term_view_to_text(term, &text, &len);
|
: term_view_to_text(term, &text, &len);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue