mirror of
https://github.com/tmux/tmux.git
synced 2025-07-19 00:00:54 -04:00
Compare commits
No commits in common. "b77778072052c14d1450d2eb89542f2493121f84" and "b202a2f1b517a3de7141fc35fbd9e39ed5ac5284" have entirely different histories.
b777780720
...
b202a2f1b5
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "tmux.h"
|
#include "tmux.h"
|
||||||
|
|
||||||
|
#define SIXEL_COLOUR_REGISTERS 1024
|
||||||
#define SIXEL_WIDTH_LIMIT 10000
|
#define SIXEL_WIDTH_LIMIT 10000
|
||||||
#define SIXEL_HEIGHT_LIMIT 10000
|
#define SIXEL_HEIGHT_LIMIT 10000
|
||||||
|
|
||||||
|
16
input.c
16
input.c
@ -1839,22 +1839,8 @@ input_csi_dispatch_sm_private(struct input_ctx *ictx)
|
|||||||
|
|
||||||
/* Handle CSI graphics SM. */
|
/* Handle CSI graphics SM. */
|
||||||
static void
|
static void
|
||||||
input_csi_dispatch_sm_graphics(struct input_ctx *ictx)
|
input_csi_dispatch_sm_graphics(__unused struct input_ctx *ictx)
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_SIXEL
|
|
||||||
int n, m, o;
|
|
||||||
|
|
||||||
if (ictx->param_list_len > 3)
|
|
||||||
return;
|
|
||||||
n = input_get(ictx, 0, 0, 0);
|
|
||||||
m = input_get(ictx, 1, 0, 0);
|
|
||||||
o = input_get(ictx, 2, 0, 0);
|
|
||||||
|
|
||||||
if (n == 1 && (m == 1 || m == 2 || m == 4))
|
|
||||||
input_reply(ictx, "\033[?%d;0;%uS", n, SIXEL_COLOUR_REGISTERS);
|
|
||||||
else
|
|
||||||
input_reply(ictx, "\033[?%d;3;%dS", n, o);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle CSI window operations. */
|
/* Handle CSI window operations. */
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
0
|
|
||||||
Λ̊1
|
|
||||||
🏻2
|
|
||||||
👍🏻3
|
|
||||||
👍🏻 👍🏻4
|
|
||||||
🤷♂️5
|
|
||||||
♂️ 7
|
|
||||||
🤷♂️8
|
|
||||||
🤷♂️9
|
|
||||||
🤷♂️10
|
|
||||||
🇪11
|
|
||||||
🇸🇪12
|
|
||||||
🇸🇪13
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
PATH=/bin:/usr/bin
|
|
||||||
TERM=screen
|
|
||||||
|
|
||||||
[ -z "$TEST_TMUX" ] && TEST_TMUX=$(readlink -f ../tmux)
|
|
||||||
TMUX="$TEST_TMUX -Ltest"
|
|
||||||
$TMUX kill-server 2>/dev/null
|
|
||||||
|
|
||||||
TMP=$(mktemp)
|
|
||||||
trap "rm -f $TMP" 0 1 15
|
|
||||||
|
|
||||||
$TMUX -f/dev/null new -d "
|
|
||||||
printf '\e[H\e[J'
|
|
||||||
printf '\e[3;1H\316\233\e[3;1H\314\2120\n'
|
|
||||||
printf '\e[4;1H\316\233\e[4;2H\314\2121\n'
|
|
||||||
printf '\e[5;1H👍\e[5;1H🏻2\n'
|
|
||||||
printf '\e[6;1H👍\e[6;3H🏻3\n'
|
|
||||||
printf '\e[7;1H👍\e[7;10H👍\e[7;3H🏻\e[7;12H🏻4\n'
|
|
||||||
printf '\e[8;1H\360\237\244\267\342\200\215\342\231\202\357\270\2175\n'
|
|
||||||
printf '\e[9;1H\360\237\244\267\e[9;1H\342\200\215\342\231\202\357\270\2176\n'
|
|
||||||
printf '\e[9;1H\360\237\244\267\e[9;1H\342\200\215\342\231\202\357\270\2177\n'
|
|
||||||
printf '\e[10;1H\360\237\244\267\e[10;3H\342\200\215\342\231\202\357\270\2178\n'
|
|
||||||
printf '\e[11;1H\360\237\244\267\e[11;3H\342\200\215\e[11;3H\342\231\202\357\270\2179\n'
|
|
||||||
printf '\e[12;1H\360\237\244\267\e[12;3H\342\200\215\342\231\202\357\270\21710\n'
|
|
||||||
printf '\e[13;1H\360\237\207\25211\n'
|
|
||||||
printf '\e[14;1H\360\237\207\270\360\237\207\25212\n'
|
|
||||||
printf '\e[15;1H\360\237\207\270 \010\010\360\237\207\25213\n'
|
|
||||||
$TMUX capturep -pe >>$TMP"
|
|
||||||
|
|
||||||
sleep 1
|
|
||||||
|
|
||||||
cmp $TMP combine-test.result || exit 1
|
|
||||||
|
|
||||||
$TMUX has 2>/dev/null && exit 1
|
|
||||||
|
|
||||||
exit 0
|
|
@ -1418,9 +1418,7 @@ screen_write_linefeed(struct screen_write_ctx *ctx, int wrapped, u_int bg)
|
|||||||
struct screen *s = ctx->s;
|
struct screen *s = ctx->s;
|
||||||
struct grid *gd = s->grid;
|
struct grid *gd = s->grid;
|
||||||
struct grid_line *gl;
|
struct grid_line *gl;
|
||||||
#ifdef ENABLE_SIXEL
|
|
||||||
int redraw = 0;
|
int redraw = 0;
|
||||||
#endif
|
|
||||||
u_int rupper = s->rupper, rlower = s->rlower;
|
u_int rupper = s->rupper, rlower = s->rlower;
|
||||||
|
|
||||||
gl = grid_get_line(gd, gd->hsize + s->cy);
|
gl = grid_get_line(gd, gd->hsize + s->cy);
|
||||||
|
4
screen.c
4
screen.c
@ -716,9 +716,9 @@ screen_mode_to_string(int mode)
|
|||||||
if (mode & MODE_CURSOR_VERY_VISIBLE)
|
if (mode & MODE_CURSOR_VERY_VISIBLE)
|
||||||
strlcat(tmp, "CURSOR_VERY_VISIBLE,", sizeof tmp);
|
strlcat(tmp, "CURSOR_VERY_VISIBLE,", sizeof tmp);
|
||||||
if (mode & MODE_MOUSE_UTF8)
|
if (mode & MODE_MOUSE_UTF8)
|
||||||
strlcat(tmp, "MOUSE_UTF8,", sizeof tmp);
|
strlcat(tmp, "UTF8,", sizeof tmp);
|
||||||
if (mode & MODE_MOUSE_SGR)
|
if (mode & MODE_MOUSE_SGR)
|
||||||
strlcat(tmp, "MOUSE_SGR,", sizeof tmp);
|
strlcat(tmp, "SGR,", sizeof tmp);
|
||||||
if (mode & MODE_BRACKETPASTE)
|
if (mode & MODE_BRACKETPASTE)
|
||||||
strlcat(tmp, "BRACKETPASTE,", sizeof tmp);
|
strlcat(tmp, "BRACKETPASTE,", sizeof tmp);
|
||||||
if (mode & MODE_FOCUSON)
|
if (mode & MODE_FOCUSON)
|
||||||
|
2
tmux.h
2
tmux.h
@ -3343,7 +3343,6 @@ int utf8_cstrhas(const char *, const struct utf8_data *);
|
|||||||
char *osdep_get_name(int, char *);
|
char *osdep_get_name(int, char *);
|
||||||
char *osdep_get_cwd(int);
|
char *osdep_get_cwd(int);
|
||||||
struct event_base *osdep_event_init(void);
|
struct event_base *osdep_event_init(void);
|
||||||
|
|
||||||
/* utf8-combined.c */
|
/* utf8-combined.c */
|
||||||
int utf8_has_zwj(const struct utf8_data *);
|
int utf8_has_zwj(const struct utf8_data *);
|
||||||
int utf8_is_zwj(const struct utf8_data *);
|
int utf8_is_zwj(const struct utf8_data *);
|
||||||
@ -3433,7 +3432,6 @@ int image_check_area(struct screen *, u_int, u_int, u_int, u_int);
|
|||||||
int image_scroll_up(struct screen *, u_int);
|
int image_scroll_up(struct screen *, u_int);
|
||||||
|
|
||||||
/* image-sixel.c */
|
/* image-sixel.c */
|
||||||
#define SIXEL_COLOUR_REGISTERS 1024
|
|
||||||
struct sixel_image *sixel_parse(const char *, size_t, u_int, u_int);
|
struct sixel_image *sixel_parse(const char *, size_t, u_int, u_int);
|
||||||
void sixel_free(struct sixel_image *);
|
void sixel_free(struct sixel_image *);
|
||||||
void sixel_log(struct sixel_image *);
|
void sixel_log(struct sixel_image *);
|
||||||
|
9
utf8.c
9
utf8.c
@ -409,10 +409,6 @@ utf8_width(struct utf8_data *ud, int *width)
|
|||||||
*width = 2;
|
*width = 2;
|
||||||
return (UTF8_DONE);
|
return (UTF8_DONE);
|
||||||
}
|
}
|
||||||
#ifdef HAVE_UTF8PROC
|
|
||||||
*width = utf8proc_wcwidth(wc);
|
|
||||||
log_debug("utf8proc_wcwidth(%05X) returned %d", (u_int)wc, *width);
|
|
||||||
#else
|
|
||||||
*width = wcwidth(wc);
|
*width = wcwidth(wc);
|
||||||
log_debug("wcwidth(%05X) returned %d", (u_int)wc, *width);
|
log_debug("wcwidth(%05X) returned %d", (u_int)wc, *width);
|
||||||
if (*width < 0) {
|
if (*width < 0) {
|
||||||
@ -422,7 +418,6 @@ utf8_width(struct utf8_data *ud, int *width)
|
|||||||
*/
|
*/
|
||||||
*width = (wc >= 0x80 && wc <= 0x9f) ? 0 : 1;
|
*width = (wc >= 0x80 && wc <= 0x9f) ? 0 : 1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (*width >= 0 && *width <= 0xff)
|
if (*width >= 0 && *width <= 0xff)
|
||||||
return (UTF8_DONE);
|
return (UTF8_DONE);
|
||||||
return (UTF8_ERROR);
|
return (UTF8_ERROR);
|
||||||
@ -432,11 +427,7 @@ utf8_width(struct utf8_data *ud, int *width)
|
|||||||
enum utf8_state
|
enum utf8_state
|
||||||
utf8_towc(const struct utf8_data *ud, wchar_t *wc)
|
utf8_towc(const struct utf8_data *ud, wchar_t *wc)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_UTF8PROC
|
|
||||||
switch (utf8proc_mbtowc(wc, ud->data, ud->size)) {
|
|
||||||
#else
|
|
||||||
switch (mbtowc(wc, ud->data, ud->size)) {
|
switch (mbtowc(wc, ud->data, ud->size)) {
|
||||||
#endif
|
|
||||||
case -1:
|
case -1:
|
||||||
log_debug("UTF-8 %.*s, mbtowc() %d", (int)ud->size, ud->data,
|
log_debug("UTF-8 %.*s, mbtowc() %d", (int)ud->size, ud->data,
|
||||||
errno);
|
errno);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user