mirror of
https://github.com/tmux/tmux.git
synced 2025-12-17 00:02:23 -05:00
Merge branch 'tmux:master' into feature-floating-window-panes
This commit is contained in:
commit
d263dbe9dd
@ -455,12 +455,12 @@ sixel_scale(struct sixel_image *si, u_int xpixel, u_int ypixel, u_int ox,
|
|||||||
new->p2 = si->p2;
|
new->p2 = si->p2;
|
||||||
|
|
||||||
new->set_ra = si->set_ra;
|
new->set_ra = si->set_ra;
|
||||||
/* clamp to slice end */
|
/* subtract offset */
|
||||||
new->ra_x = si->ra_x < psx ? si->ra_x : psx;
|
|
||||||
new->ra_y = si->ra_y < psy ? si->ra_y : psy;
|
|
||||||
/* subtract slice origin */
|
|
||||||
new->ra_x = new->ra_x > pox ? new->ra_x - pox : 0;
|
new->ra_x = new->ra_x > pox ? new->ra_x - pox : 0;
|
||||||
new->ra_y = new->ra_y > poy ? new->ra_y - poy : 0;
|
new->ra_y = new->ra_y > poy ? new->ra_y - poy : 0;
|
||||||
|
/* clamp to size */
|
||||||
|
new->ra_x = si->ra_x < psx ? si->ra_x : psx;
|
||||||
|
new->ra_y = si->ra_y < psy ? si->ra_y : psy;
|
||||||
/* resize */
|
/* resize */
|
||||||
new->ra_x = new->ra_x * xpixel / si->xpixel;
|
new->ra_x = new->ra_x * xpixel / si->xpixel;
|
||||||
new->ra_y = new->ra_y * ypixel / si->ypixel;
|
new->ra_y = new->ra_y * ypixel / si->ypixel;
|
||||||
|
|||||||
3
image.c
3
image.c
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
static struct images all_images = TAILQ_HEAD_INITIALIZER(all_images);
|
static struct images all_images = TAILQ_HEAD_INITIALIZER(all_images);
|
||||||
static u_int all_images_count;
|
static u_int all_images_count;
|
||||||
|
#define MAX_IMAGE_COUNT 20
|
||||||
|
|
||||||
static void
|
static void
|
||||||
image_free(struct image *im)
|
image_free(struct image *im)
|
||||||
@ -111,7 +112,7 @@ image_store(struct screen *s, struct sixel_image *si)
|
|||||||
TAILQ_INSERT_TAIL(&s->images, im, entry);
|
TAILQ_INSERT_TAIL(&s->images, im, entry);
|
||||||
|
|
||||||
TAILQ_INSERT_TAIL(&all_images, im, all_entry);
|
TAILQ_INSERT_TAIL(&all_images, im, all_entry);
|
||||||
if (++all_images_count == 10/*XXX*/)
|
if (++all_images_count == MAX_IMAGE_COUNT)
|
||||||
image_free(TAILQ_FIRST(&all_images));
|
image_free(TAILQ_FIRST(&all_images));
|
||||||
|
|
||||||
return (im);
|
return (im);
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
Λ̊1
|
Λ̊1
|
||||||
🏻2
|
🏻2
|
||||||
👍🏻3
|
👍🏻3
|
||||||
👍🏻 👍🏻4
|
👍🏻 👍🏻4
|
||||||
🤷♂️5
|
🤷♂️5
|
||||||
♂️7
|
♂️7
|
||||||
🤷♂️8
|
🤷♂️8
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user