mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-08 08:20:59 -04:00
parent
ab6b1b3679
commit
5ee902551a
2 changed files with 11 additions and 2 deletions
|
|
@ -78,6 +78,8 @@
|
||||||
marked as obsolete by POSIX.
|
marked as obsolete by POSIX.
|
||||||
* `alt+tab` now emits `ESC \t` instead of `CSI 27;3;9~`
|
* `alt+tab` now emits `ESC \t` instead of `CSI 27;3;9~`
|
||||||
(https://codeberg.org/dnkl/foot/issues/900).
|
(https://codeberg.org/dnkl/foot/issues/900).
|
||||||
|
* File pasted, or dropped, on the alt screen is no longer quoted
|
||||||
|
(https://codeberg.org/dnkl/foot/issues/379).
|
||||||
|
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
|
|
|
||||||
11
selection.c
11
selection.c
|
|
@ -1552,6 +1552,7 @@ struct clipboard_receive {
|
||||||
int timeout_fd;
|
int timeout_fd;
|
||||||
struct itimerspec timeout;
|
struct itimerspec timeout;
|
||||||
bool bracketed;
|
bool bracketed;
|
||||||
|
bool quote_paths;
|
||||||
|
|
||||||
void (*decoder)(struct clipboard_receive *ctx, char *data, size_t size);
|
void (*decoder)(struct clipboard_receive *ctx, char *data, size_t size);
|
||||||
void (*finish)(struct clipboard_receive *ctx);
|
void (*finish)(struct clipboard_receive *ctx);
|
||||||
|
|
@ -1641,9 +1642,13 @@ decode_one_uri(struct clipboard_receive *ctx, char *uri, size_t len)
|
||||||
ctx->add_space = true;
|
ctx->add_space = true;
|
||||||
|
|
||||||
if (strcmp(scheme, "file") == 0 && hostname_is_localhost(host)) {
|
if (strcmp(scheme, "file") == 0 && hostname_is_localhost(host)) {
|
||||||
ctx->cb("'", 1, ctx->user);
|
if (ctx->quote_paths)
|
||||||
|
ctx->cb("'", 1, ctx->user);
|
||||||
|
|
||||||
ctx->cb(path, strlen(path), ctx->user);
|
ctx->cb(path, strlen(path), ctx->user);
|
||||||
ctx->cb("'", 1, ctx->user);
|
|
||||||
|
if (ctx->quote_paths)
|
||||||
|
ctx->cb("'", 1, ctx->user);
|
||||||
} else
|
} else
|
||||||
ctx->cb(uri, len, ctx->user);
|
ctx->cb(uri, len, ctx->user);
|
||||||
|
|
||||||
|
|
@ -1830,6 +1835,7 @@ begin_receive_clipboard(struct terminal *term, int read_fd,
|
||||||
.timeout_fd = timeout_fd,
|
.timeout_fd = timeout_fd,
|
||||||
.timeout = timeout,
|
.timeout = timeout,
|
||||||
.bracketed = term->bracketed_paste,
|
.bracketed = term->bracketed_paste,
|
||||||
|
.quote_paths = term->grid == &term->normal,
|
||||||
.decoder = (mime_type == DATA_OFFER_MIME_URI_LIST
|
.decoder = (mime_type == DATA_OFFER_MIME_URI_LIST
|
||||||
? &fdm_receive_decoder_uri
|
? &fdm_receive_decoder_uri
|
||||||
: &fdm_receive_decoder_plain),
|
: &fdm_receive_decoder_plain),
|
||||||
|
|
@ -1900,6 +1906,7 @@ receive_offer(char *data, size_t size, void *user)
|
||||||
xassert(term->is_sending_paste_data);
|
xassert(term->is_sending_paste_data);
|
||||||
term_paste_data_to_slave(term, data, size);
|
term_paste_data_to_slave(term, data, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
receive_offer_done(void *user)
|
receive_offer_done(void *user)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue