mirror of
https://github.com/tmux/tmux.git
synced 2025-11-05 01:56:07 +00:00
Merge branch 'obsd-master'
This commit is contained in:
@@ -144,13 +144,13 @@ cmd_resize_pane_mouse_update(struct client *c, struct mouse_event *m)
|
|||||||
w = wl->window;
|
w = wl->window;
|
||||||
|
|
||||||
y = m->y + m->oy; x = m->x + m->ox;
|
y = m->y + m->oy; x = m->x + m->ox;
|
||||||
if (m->statusat == 0 && y > 0)
|
if (m->statusat == 0 && y >= m->statuslines)
|
||||||
y--;
|
y -= m->statuslines;
|
||||||
else if (m->statusat > 0 && y >= (u_int)m->statusat)
|
else if (m->statusat > 0 && y >= (u_int)m->statusat)
|
||||||
y = m->statusat - 1;
|
y = m->statusat - 1;
|
||||||
ly = m->ly + m->oy; lx = m->lx + m->ox;
|
ly = m->ly + m->oy; lx = m->lx + m->ox;
|
||||||
if (m->statusat == 0 && ly > 0)
|
if (m->statusat == 0 && ly >= m->statuslines)
|
||||||
ly--;
|
ly -= m->statuslines;
|
||||||
else if (m->statusat > 0 && ly >= (u_int)m->statusat)
|
else if (m->statusat > 0 && ly >= (u_int)m->statusat)
|
||||||
ly = m->statusat - 1;
|
ly = m->statusat - 1;
|
||||||
|
|
||||||
|
|||||||
4
cmd.c
4
cmd.c
@@ -596,8 +596,8 @@ cmd_mouse_at(struct window_pane *wp, struct mouse_event *m, u_int *xp,
|
|||||||
}
|
}
|
||||||
log_debug("%s: x=%u, y=%u%s", __func__, x, y, last ? " (last)" : "");
|
log_debug("%s: x=%u, y=%u%s", __func__, x, y, last ? " (last)" : "");
|
||||||
|
|
||||||
if (m->statusat == 0 && y > 0)
|
if (m->statusat == 0 && y >= m->statuslines)
|
||||||
y--;
|
y -= m->statuslines;
|
||||||
|
|
||||||
if (x < wp->xoff || x >= wp->xoff + wp->sx)
|
if (x < wp->xoff || x >= wp->xoff + wp->sx)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|||||||
@@ -565,7 +565,7 @@ format_draw(struct screen_write_ctx *octx, const struct grid_cell *base,
|
|||||||
cp++;
|
cp++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Draw the cell to th current screen. */
|
/* Draw the cell to the current screen. */
|
||||||
screen_write_cell(&ctx[current], &sy.gc);
|
screen_write_cell(&ctx[current], &sy.gc);
|
||||||
width[current] += ud->width;
|
width[current] += ud->width;
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
5
grid.c
5
grid.c
@@ -37,12 +37,12 @@
|
|||||||
|
|
||||||
/* Default grid cell data. */
|
/* Default grid cell data. */
|
||||||
const struct grid_cell grid_default_cell = {
|
const struct grid_cell grid_default_cell = {
|
||||||
0, 0, 8, 8, 0, { { ' ' }, 0, 1, 1 }
|
{ { ' ' }, 0, 1, 1 }, 0, 0, 8, 8, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Cleared grid cell data. */
|
/* Cleared grid cell data. */
|
||||||
const struct grid_cell grid_cleared_cell = {
|
const struct grid_cell grid_cleared_cell = {
|
||||||
GRID_FLAG_CLEARED, 0, 8, 8, 0, { { ' ' }, 0, 1, 1 }
|
{ { ' ' }, 0, 1, 1 }, 0, GRID_FLAG_CLEARED, 8, 8, 0
|
||||||
};
|
};
|
||||||
static const struct grid_cell_entry grid_cleared_entry = {
|
static const struct grid_cell_entry grid_cleared_entry = {
|
||||||
GRID_FLAG_CLEARED, { .data = { 0, 8, 8, ' ' } }
|
GRID_FLAG_CLEARED, { .data = { 0, 8, 8, ' ' } }
|
||||||
@@ -475,6 +475,7 @@ grid_get_cell1(struct grid_line *gl, u_int px, struct grid_cell *gc)
|
|||||||
gc->bg = gce->data.bg;
|
gc->bg = gce->data.bg;
|
||||||
if (gce->flags & GRID_FLAG_BG256)
|
if (gce->flags & GRID_FLAG_BG256)
|
||||||
gc->bg |= COLOUR_FLAG_256;
|
gc->bg |= COLOUR_FLAG_256;
|
||||||
|
gc->us = 0;
|
||||||
utf8_set(&gc->data, gce->data.data);
|
utf8_set(&gc->data, gce->data.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ static const struct grid_cell *screen_write_combine(struct screen_write_ctx *,
|
|||||||
const struct utf8_data *, u_int *);
|
const struct utf8_data *, u_int *);
|
||||||
|
|
||||||
static const struct grid_cell screen_write_pad_cell = {
|
static const struct grid_cell screen_write_pad_cell = {
|
||||||
GRID_FLAG_PADDING, 0, 8, 8, 0, { { 0 }, 0, 0, 0 }
|
{ { 0 }, 0, 0, 0 }, 0, GRID_FLAG_PADDING, 0, 8, 8
|
||||||
};
|
};
|
||||||
|
|
||||||
struct screen_write_collect_item {
|
struct screen_write_collect_item {
|
||||||
|
|||||||
@@ -522,9 +522,10 @@ have_event:
|
|||||||
|
|
||||||
/* Is this on the status line? */
|
/* Is this on the status line? */
|
||||||
m->statusat = status_at_line(c);
|
m->statusat = status_at_line(c);
|
||||||
|
m->statuslines = status_line_size(c);
|
||||||
if (m->statusat != -1 &&
|
if (m->statusat != -1 &&
|
||||||
y >= (u_int)m->statusat &&
|
y >= (u_int)m->statusat &&
|
||||||
y < m->statusat + status_line_size(c)) {
|
y < m->statusat + m->statuslines) {
|
||||||
sr = status_get_range(c, x, y - m->statusat);
|
sr = status_get_range(c, x, y - m->statusat);
|
||||||
if (sr == NULL) {
|
if (sr == NULL) {
|
||||||
where = STATUS_DEFAULT;
|
where = STATUS_DEFAULT;
|
||||||
@@ -553,8 +554,8 @@ have_event:
|
|||||||
/* Not on status line. Adjust position and check for border or pane. */
|
/* Not on status line. Adjust position and check for border or pane. */
|
||||||
if (where == NOWHERE) {
|
if (where == NOWHERE) {
|
||||||
px = x;
|
px = x;
|
||||||
if (m->statusat == 0 && y > 0)
|
if (m->statusat == 0 && y >= m->statuslines)
|
||||||
py = y - 1;
|
py = y - m->statuslines;
|
||||||
else if (m->statusat > 0 && y >= (u_int)m->statusat)
|
else if (m->statusat > 0 && y >= (u_int)m->statusat)
|
||||||
py = m->statusat - 1;
|
py = m->statusat - 1;
|
||||||
else
|
else
|
||||||
|
|||||||
2
style.c
2
style.c
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
/* Default style. */
|
/* Default style. */
|
||||||
static struct style style_default = {
|
static struct style style_default = {
|
||||||
{ 0, 0, 8, 8, 0, { { ' ' }, 0, 1, 1 } },
|
{ { { ' ' }, 0, 1, 1 }, 0, 0, 8, 8, 0 },
|
||||||
|
|
||||||
8,
|
8,
|
||||||
STYLE_ALIGN_DEFAULT,
|
STYLE_ALIGN_DEFAULT,
|
||||||
|
|||||||
6
tmux.h
6
tmux.h
@@ -598,13 +598,13 @@ enum utf8_state {
|
|||||||
|
|
||||||
/* Grid cell data. */
|
/* Grid cell data. */
|
||||||
struct grid_cell {
|
struct grid_cell {
|
||||||
u_char flags;
|
struct utf8_data data; /* 21 bytes */
|
||||||
u_short attr;
|
u_short attr;
|
||||||
|
u_char flags;
|
||||||
int fg;
|
int fg;
|
||||||
int bg;
|
int bg;
|
||||||
int us;
|
int us;
|
||||||
struct utf8_data data;
|
} __packed;
|
||||||
};
|
|
||||||
struct grid_cell_entry {
|
struct grid_cell_entry {
|
||||||
u_char flags;
|
u_char flags;
|
||||||
union {
|
union {
|
||||||
|
|||||||
Reference in New Issue
Block a user