mirror of
https://github.com/tmux/tmux.git
synced 2026-10-06 17:49:52 +00:00
Use correct X position when combining characters, GitHub issue 5511 from
Francesc Rosas.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: screen-write.c,v 1.287 2026/08/17 20:04:00 nicm Exp $ */
|
/* $OpenBSD: screen-write.c,v 1.288 2026/08/21 09:53:04 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||||
@@ -2760,10 +2760,11 @@ screen_write_combine(struct screen_write_ctx *ctx, const struct grid_cell *gc)
|
|||||||
struct grid *gd = s->grid;
|
struct grid *gd = s->grid;
|
||||||
const struct utf8_data *ud = &gc->data;
|
const struct utf8_data *ud = &gc->data;
|
||||||
struct options *oo = global_options;
|
struct options *oo = global_options;
|
||||||
u_int i, n, cx = s->cx, cy = s->cy, vis, yoff = 0;
|
u_int i, n, cx = s->cx, cy = s->cy, vis;
|
||||||
struct grid_cell last;
|
struct grid_cell last;
|
||||||
struct tty_ctx ttyctx;
|
struct tty_ctx ttyctx;
|
||||||
int force_wide = 0, zero_width = 0;
|
int force_wide = 0, zero_width = 0;
|
||||||
|
int xoff = 0, yoff = 0;
|
||||||
struct visible_ranges *r;
|
struct visible_ranges *r;
|
||||||
|
|
||||||
/* Ignore U+3164 HANGUL_FILLER entirely. */
|
/* Ignore U+3164 HANGUL_FILLER entirely. */
|
||||||
@@ -2857,9 +2858,11 @@ screen_write_combine(struct screen_write_ctx *ctx, const struct grid_cell *gc)
|
|||||||
* obscured in the middle, only on left or right, but there could be an
|
* obscured in the middle, only on left or right, but there could be an
|
||||||
* empty range in the visible ranges so we add them all up.
|
* empty range in the visible ranges so we add them all up.
|
||||||
*/
|
*/
|
||||||
if (wp != NULL)
|
if (wp != NULL) {
|
||||||
|
xoff = wp->xoff;
|
||||||
yoff = wp->yoff;
|
yoff = wp->yoff;
|
||||||
r = window_visible_ranges(wp, cx - n, cy + yoff, n, NULL);
|
}
|
||||||
|
r = window_visible_ranges(wp, xoff + cx - n, cy + yoff, n, NULL);
|
||||||
for (i = 0, vis = 0; i < r->used; i++)
|
for (i = 0, vis = 0; i < r->used; i++)
|
||||||
vis += r->ranges[i].nx;
|
vis += r->ranges[i].nx;
|
||||||
if (vis < n) {
|
if (vis < n) {
|
||||||
|
|||||||
Reference in New Issue
Block a user