aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-14 20:18:23 +0200
committeruser <user@clank>2026-08-14 20:18:23 +0200
commit373931bf85fa92bc326f2ab68edf14a5bc15b260 (patch)
tree61399ade7c707800c86ef1c02ba72123fc2c3be6
parentsl0ppty: pick a minimise mark that fills its cell (diff)
downloadslosh-373931bf85fa92bc326f2ab68edf14a5bc15b260.tar.gz
slosh-373931bf85fa92bc326f2ab68edf14a5bc15b260.tar.xz
slosh-373931bf85fa92bc326f2ab68edf14a5bc15b260.zip
sl0ppty: minimised panes get one row between them, and ASCII marks
The strip was a row per minimised pane, which let putting things away cost more room than leaving them out. It is one row now, shaped like the tab strip and for the same reason: a list of names you click to go somewhere. Three panes put away leave the survivor exactly as tall as one did, and there is a test that says so, because that is the whole change. The panes on it are no longer laid out at all — the bar draws them, so they have no rect. The row the bar occupies is worked out by the layout and stored, rather than by the drawing working it out again from the same inputs; two copies of that sum is how a click lands somewhere the eye did not. The frame's marks are plain ASCII now. Spacing has been reported twice and the cells were even both times: what is uneven is the glyphs. A light character floating in a mostly empty cell hands that space to the gap beside it, and the fix of picking heavier glyphs only holds for fonts I can see. ASCII has neither that problem nor the double-width one, and "[]" and "][" say maximise and restore about as clearly as anything. That needed the button width measured rather than assumed. It was hardcoded to three cells, which was fine while every mark was one character and silently wrong the moment one was two: the mark would have been drawn over its neighbour, and the neighbour's hit would have covered a cell it did not draw. Also fixes a case that could not happen with a row each: when there is no room for the bar at all, the tab flattens rather than leaving minimised panes with no rect and nobody drawing them.
-rw-r--r--README.md10
-rw-r--r--config/config.kdl19
-rw-r--r--src/app.c83
-rw-r--r--src/config.c12
-rw-r--r--src/config.h3
-rw-r--r--tests/test_minimize.py169
-rw-r--r--tests/test_zoom.py4
7 files changed, 203 insertions, 97 deletions
diff --git a/README.md b/README.md
index b203b2b..4f6b2cf 100644
--- a/README.md
+++ b/README.md
@@ -78,14 +78,14 @@ rewrites its title cannot undo it; clear the name and the pane goes back to the
program's title. The name is only the title *text*: the rest of the top border
is still the top edge, and still splits upward when clicked.
-**Zoom a pane** with `C-a z` or the `□` button in its top-right corner, and it
+**Zoom a pane** with `C-a z` or the `[]` button in its top-right corner, and it
fills the tab until you put it back; the other panes keep running, they are
-just not drawn. `×` beside it closes the pane. `pane_buttons false` takes both
+just not drawn. `x` beside it closes the pane. `pane_buttons false` takes both
buttons off without touching the keybindings.
-**Minimise a pane** with `C-a m` or the `▁` button and it leaves the layout for
-a strip along the bottom, one row each, still running — the panes it leaves
-behind take the space back. Click its row to bring it back. Once a tab is too
+**Minimise a pane** with `C-a m` or the `_` button and it leaves the layout for
+a single row along the bottom listing everything put away, still running — the panes it leaves
+behind take the space back. Click its name to bring it back. Once a tab is too
small and has flattened into a list, being minimised means nothing: every pane
is a row down there already.
diff --git a/config/config.kdl b/config/config.kdl
index 2567060..f2437a4 100644
--- a/config/config.kdl
+++ b/config/config.kdl
@@ -53,16 +53,17 @@ title_inset 2
// the setting is about the affordance and not the verb.
pane_buttons true
-// Emoji are drawn two columns wide by many terminals while chrome here is
-// booked as one, so these default to narrow glyphs. Pick marks of similar
-// visual weight: the buttons are evenly spaced, but a glyph that floats in a
-// mostly-empty cell donates that space to the gap and looks further off than
-// its neighbours. Put the character itself
+// Plain ASCII by default. The buttons are evenly spaced whatever is in them,
+// but how even they *look* depends on the glyphs: a light character floating
+// in a mostly-empty cell donates that space to the gap beside it, and emoji are
+// drawn two columns wide by many terminals while chrome here is booked as one.
+// ASCII has neither problem. A mark may be more than one character -- the
+// button is measured, not assumed -- so "[]" and "][" work. Put the character itself
// here; this file has no \u escape.
-zoom_mark "□"
-zoom_on_mark "▣"
-close_mark "×"
-min_mark "▁"
+zoom_mark "[]"
+zoom_on_mark "]["
+close_mark "x"
+min_mark "_"
bell_indicator true
diff --git a/src/app.c b/src/app.c
index c2b556e..f608d1f 100644
--- a/src/app.c
+++ b/src/app.c
@@ -95,6 +95,8 @@ bool app_reload_config(char *err, size_t errcap) {
#define BELL_C (CFG.bell)
#define PANE_BTN (CFG.pane_button)
#define PANE_BTN_HOVER (CFG.pane_button_hover)
+#define MINBAR (CFG.minbar)
+#define MINBAR_HOVER (CFG.minbar_hover)
static const color_t NO_COLOR = {0};
@@ -144,6 +146,10 @@ struct node {
typedef struct {
node_t *root;
node_t *focus;
+ /* Where the minimised panes are listed, or zero-sized when none are. Set by
+ * the layout and consumed by the drawing, rather than each working the
+ * geometry out for itself. */
+ rect_t min_bar;
/* The pane filling this tab on its own, or 0. Intent rather than derived
* state, like focus: nothing about the tree says a pane is zoomed, you said
* so. Kept per tab so zooming one does not disturb another. */
@@ -321,7 +327,8 @@ size_t app_toast_count(app_t *a) {
return a->ntoasts;
}
-static size_t count_leaves(node_t *n); /* both defined with the layout */
+static size_t count_leaves(node_t *n); /* all defined with the layout */
+static size_t collect_minimized(node_t *n, node_t **out, size_t cap, size_t k);
static size_t collect_leaves(node_t *n, node_t **out, size_t cap, size_t k);
/* The line along the bottom: what you are looking at, rather than what you
@@ -332,6 +339,42 @@ static size_t collect_leaves(node_t *n, node_t **out, size_t cap, size_t k);
* what it calls itself, and whether it is in a state worth knowing about —
* scrolled back, on an alternate screen, or not started yet. Those last three
* are the ones you can otherwise only discover by being surprised. */
+/* The minimised panes, listed along one row. Shaped like the tab strip because
+ * it is the same kind of thing: a row of names you click to go somewhere. */
+static void draw_min_bar(app_t *a, screen_t *s) {
+ if (!a->ntabs) return;
+ rect_t bar = cur(a)->min_bar;
+ if (!bar.w || !bar.h) return;
+
+ node_t *mins[64];
+ size_t nmin = collect_minimized(cur(a)->root, mins, 64, 0);
+ if (!nmin) return;
+
+ uint16_t x = bar.x;
+ uint16_t right = (uint16_t)(bar.x + bar.w);
+
+ /* A legend, so a row of bare names is not a mystery. */
+ x = (uint16_t)(x + screen_text(s, x, bar.y, CFG.min_mark, MINBAR, NO_COLOR, 0));
+ x = (uint16_t)(x + 1);
+
+ for (size_t i = 0; i < nmin && x < right; i++) {
+ const char *nm = pane_title(mins[i]->pane);
+ char label[64];
+ snprintf(label, sizeof label, " %s ", nm && *nm ? nm : "pane");
+ /* Drawn, measured, then redrawn lit if the pointer turns out to be on it:
+ * the same trick the tab strip uses, and for the same reason — the cells
+ * that light up are exactly the ones registered. */
+ uint16_t w = screen_text(s, x, bar.y, label, MINBAR, NO_COLOR, 0);
+ if ((uint16_t)(x + w) > right) break;
+ if (ptr_on(a, x, bar.y, w, 1))
+ screen_text(s, x, bar.y, label, MINBAR_HOVER, NO_COLOR, ATTR_BOLD);
+ char action[48];
+ snprintf(action, sizeof action, "focus:%u", mins[i]->id);
+ hit_add(&s->hits, x, bar.y, w, 1, action);
+ x = (uint16_t)(x + w);
+ }
+}
+
static void draw_status_line(app_t *a, screen_t *s) {
if (!CFG.status_line || s->rows < 3) return;
uint16_t y = (uint16_t)(s->rows - CFG.gap - 1);
@@ -964,31 +1007,38 @@ static void layout(app_t *a) {
/* Minimised panes come out of the layout and sit in a strip along the
* bottom, one row each. The tree is then laid out in what is left, so a
* minimised pane costs a row rather than a share. */
+ /* Minimised panes are listed on one row along the bottom, however many there
+ * are. A row each would let putting things away cost more room than having
+ * them out, which is the opposite of the point. */
node_t *mins[64];
size_t nmin = collect_minimized(root, mins, 64, 0);
rect_t tree_r = r;
+ bool no_room = false;
+ cur(a)->min_bar = (rect_t){0, 0, 0, 0};
if (nmin) {
- /* If the strip would leave too little to be worth looking at, do not
- * reserve it: the tab flattens instead, and down there a minimised pane is
- * just another row, which is what it would have become anyway. */
- if ((uint16_t)(r.h - nmin) >= (uint16_t)(MIN_PANE_ROWS + 2))
- tree_r.h = (uint16_t)(r.h - nmin);
- else
- nmin = 0;
+ if (r.h >= (uint16_t)(MIN_PANE_ROWS + 3)) {
+ tree_r.h = (uint16_t)(r.h - 1);
+ cur(a)->min_bar = (rect_t){r.x, (uint16_t)(r.y + r.h - 1), r.w, 1};
+ } else {
+ no_room = true;
+ }
}
layout_ctx_t probe = {.focus = cur(a)->focus, .apply = false};
layout_node(root, tree_r, &probe);
+ /* Nowhere to put the bar means nowhere to put anything: flatten, where every
+ * pane is a row and being minimised is not a different thing to be. */
+ if (no_room) probe.overflow = true;
layout_ctx_t real = {.focus = cur(a)->focus, .apply = true};
if (!probe.overflow) {
layout_node(root, tree_r, &real);
- /* The strip, under the layout it was taken out of. */
+ /* They are drawn by the bar, not as panes: no rect of their own. */
for (size_t i = 0; i < nmin; i++)
- collapse_leaf(mins[i], (rect_t){r.x, (uint16_t)(tree_r.y + tree_r.h + i),
- r.w, 1});
+ collapse_leaf(mins[i], (rect_t){r.x, r.y, 0, 0});
return;
}
+ cur(a)->min_bar = (rect_t){0, 0, 0, 0}; /* a list has no separate bar */
if (r.h >= (uint16_t)(count_leaves(root) + 2)) {
/* One row per pane, plus a body worth opening into: a frame is two rows. */
layout_stack(root, r, &real);
@@ -1841,7 +1891,15 @@ static void draw_frame(app_t *a, screen_t *s, node_t *leaf) {
for (size_t i = 0; i < sizeof btns / sizeof *btns; i++) {
char cell[24];
snprintf(cell, sizeof cell, " %s ", btns[i].mark);
- uint16_t bw = 3;
+ /* Measured in cells rather than assumed: a mark is yours to choose and
+ * may be more than one character. Booking three cells for a
+ * two-character mark would draw it over its neighbour and hand the
+ * neighbour's hit a cell it does not own. */
+ uint16_t mw = 0;
+ for (const char *q = btns[i].mark; *q; q++)
+ if (((unsigned char)*q & 0xC0) != 0x80) mw++;
+ if (!mw) mw = 1;
+ uint16_t bw = (uint16_t)(mw + 2);
if (bx < r.x + 4 + bw) break;
uint16_t px = (uint16_t)(bx - bw + 1);
bool hot = ptr_on(a, px, r.y, bw, 1);
@@ -2556,6 +2614,7 @@ void app_compose(app_t *a, screen_t *s) {
layout(a);
if (CFG.status_bar) draw_tab_strip(a, s);
draw_node(a, s, cur(a)->root);
+ draw_min_bar(a, s);
draw_status_line(a, s);
if (a->finder) draw_finder(a, s); /* painted last, so its hits win */
draw_toasts(a, s); /* and above even that: it is transient */
diff --git a/src/config.c b/src/config.c
index f6c9e5f..7dd12b7 100644
--- a/src/config.c
+++ b/src/config.c
@@ -172,10 +172,10 @@ void config_defaults(config_t *c) {
c->title_align = ALIGN_CENTER;
c->title_inset = 2;
c->pane_buttons = true;
- snprintf(c->zoom_mark, sizeof c->zoom_mark, "\u25a1");
- snprintf(c->zoom_on_mark, sizeof c->zoom_on_mark, "\u25a3");
- snprintf(c->close_mark, sizeof c->close_mark, "\u00d7");
- snprintf(c->min_mark, sizeof c->min_mark, "\u2581");
+ snprintf(c->zoom_mark, sizeof c->zoom_mark, "[]");
+ snprintf(c->zoom_on_mark, sizeof c->zoom_on_mark, "][");
+ snprintf(c->close_mark, sizeof c->close_mark, "x");
+ snprintf(c->min_mark, sizeof c->min_mark, "_");
c->bell_indicator = true;
snprintf(c->bell_mark, sizeof c->bell_mark, "\u2022");
c->min_pane_cols = 24;
@@ -256,6 +256,8 @@ void config_defaults(config_t *c) {
c->finder_sel_bg = accent;
c->bell = accent;
+ c->minbar = dim;
+ c->minbar_hover = accent;
c->pane_button = dim;
c->pane_button_hover = accent;
@@ -480,6 +482,8 @@ bool config_load(config_t *c, const char *path, char *err, size_t errcap) {
{"finder_sel_fg", &c->finder_sel_fg},
{"finder_sel_bg", &c->finder_sel_bg},
{"bell", &c->bell},
+ {"minbar", &c->minbar},
+ {"minbar_hover", &c->minbar_hover},
{"pane_button", &c->pane_button},
{"pane_button_hover", &c->pane_button_hover},
{"rename_fg", &c->rename_fg},
diff --git a/src/config.h b/src/config.h
index 0bbaa9e..28350ce 100644
--- a/src/config.h
+++ b/src/config.h
@@ -193,6 +193,9 @@ typedef struct {
/* the frame's own buttons */
color_t pane_button, pane_button_hover;
+ /* the row of minimised panes along the bottom */
+ color_t minbar, minbar_hover;
+
/* announcements */
color_t toast_fg, toast_bg;
diff --git a/tests/test_minimize.py b/tests/test_minimize.py
index 9582ca2..979354a 100644
--- a/tests/test_minimize.py
+++ b/tests/test_minimize.py
@@ -1,11 +1,11 @@
#!/usr/bin/env python3
"""Putting a pane away.
-A minimised pane leaves the layout and sits in a strip along the bottom, one
-row each, still running. It is intent rather than a derived state, so the
-things worth checking are the same ones zoom needed: that it survives the
-layout being recomputed, that there is always a way back, and that it does not
-invent a state with nothing on screen.
+A minimised pane leaves the layout entirely and is listed on a single row along
+the bottom, whatever the number of them. It is intent rather than derived
+state, so what is worth checking is that it survives the layout being
+recomputed, that there is always a way back, and that it does not invent a
+state with nothing on screen.
"""
import os
import sys
@@ -29,50 +29,95 @@ def here(s):
return [p for p in s.panes() if p["tab"] == active]
-def strip(s):
- return [p for p in here(s) if p["h"] == 1]
+def open_panes(s):
+ return [p for p in here(s) if p["w"] > 1]
-def open_panes(s):
- return [p for p in here(s) if p["h"] > 1]
+def put_away(s):
+ """Minimised panes get no rect at all: the bar draws them, not the layout."""
+ return [p for p in here(s) if p["w"] <= 1]
+
+
+def bar_row(s):
+ """The bar's y, which is the row below every open pane."""
+ op = open_panes(s)
+ return max(p["y"] + p["h"] for p in op) if op else None
+
+
+def bar_entries(s):
+ y = bar_row(s)
+ if y is None:
+ return []
+ return [h for h in s.snapshot().hits
+ if h["y"] == y and h["action"].startswith("focus:")]
-def test_minimising_moves_a_pane_to_the_strip():
+def minimize_focused(s):
+ s.send(r"\x01m")
+ s.settle(20)
+
+
+def test_minimising_takes_a_pane_out_of_the_layout():
with Session(SH, cols=90, rows=20) as s:
s.settle(20)
s.api("split", dir="cols")
s.settle(20)
- before = sorted(p["w"] for p in open_panes(s))
+ before = max(p["w"] for p in open_panes(s))
- s.send(r"\x01m")
- s.settle(20)
- check("one pane is now a single row", len(strip(s)) == 1,
+ minimize_focused(s)
+ check("one pane is gone from the layout", len(put_away(s)) == 1,
str(here(s)))
- check("and the other still has the tab", len(open_panes(s)) == 1,
- str(here(s)))
- check("which is wider than it was, having taken the space back",
- open_panes(s)[0]["w"] > max(before), str(here(s)))
+ check("and the other took the space back",
+ open_panes(s)[0]["w"] > before, str(here(s)))
+ check("it is listed on the bar", len(bar_entries(s)) == 1,
+ str(bar_entries(s)))
+ check("which sits below the panes",
+ bar_entries(s)[0]["y"] == bar_row(s), str(bar_entries(s)))
- row = strip(s)[0]
- rest = open_panes(s)[0]
- check("the strip sits under the layout, not in it",
- row["y"] > rest["y"] + rest["h"] - 1, f"{row} vs {rest}")
- check("and spans the width", row["w"] == rest["w"], str(here(s)))
+def test_the_bar_is_one_row_however_many_are_put_away():
+ """A row each would let putting things away cost more room than having them
+ out, which is the opposite of the point."""
+ with Session(SH, cols=100, rows=22) as s:
+ s.settle(20)
+ for _ in range(3):
+ s.api("split", dir="cols")
+ s.settle(10)
+ check("four panes", len(open_panes(s)) == 4, str(here(s)))
-def test_clicking_the_row_brings_it_back():
- with Session(SH, cols=90, rows=20) as s:
+ minimize_focused(s)
+ one = open_panes(s)[0]["h"]
+ entries_one = len(bar_entries(s))
+ minimize_focused(s)
+ minimize_focused(s)
+ three = open_panes(s)[0]["h"]
+
+ check("three are put away", len(put_away(s)) == 3, str(here(s)))
+ check("all three are listed", len(bar_entries(s)) == 3,
+ str(bar_entries(s)))
+ check("and the survivor is no shorter than with one put away",
+ three == one, f"{one} -> {three}")
+ check("because the bar was one row either way", entries_one == 1,
+ str(entries_one))
+
+
+def test_clicking_an_entry_brings_that_pane_back():
+ with Session(SH, cols=100, rows=20) as s:
s.settle(20)
s.api("split", dir="cols")
s.settle(20)
layout_before = sorted((p["x"], p["w"]) for p in open_panes(s))
- s.send(r"\x01m")
- s.settle(20)
- row = strip(s)[0]
- s.click(row["x"] + 4, row["y"])
+ minimize_focused(s)
+ gone = put_away(s)[0]["id"]
+ e = [h for h in bar_entries(s) if h["action"] == f"focus:{gone}"]
+ check("the entry names the pane it stands for", len(e) == 1,
+ str(bar_entries(s)))
+ if not e:
+ return
+ s.click(e[0]["x"] + 1, e[0]["y"])
s.settle(20)
- check("clicking the row restores the pane", strip(s) == [], str(here(s)))
+ check("clicking it restores the pane", put_away(s) == [], str(here(s)))
check("and the layout is the one it left",
sorted((p["x"], p["w"]) for p in open_panes(s)) == layout_before,
str(here(s)))
@@ -85,35 +130,31 @@ def test_focusing_it_by_any_route_brings_it_back():
s.settle(20)
s.api("split", dir="cols")
s.settle(20)
- s.send(r"\x01m")
- s.settle(20)
- gone = strip(s)[0]["id"]
+ minimize_focused(s)
+ gone = put_away(s)[0]["id"]
s.api("focus", id=gone)
s.settle(20)
check("focusing it over the control API restores it",
- strip(s) == [], str(here(s)))
+ put_away(s) == [], str(here(s)))
def test_it_will_not_leave_the_tab_empty():
with Session(SH, cols=90, rows=20) as s:
s.settle(20)
check("one pane to start", len(here(s)) == 1, str(here(s)))
- s.send(r"\x01m")
- s.settle(20)
- check("minimising the only pane is refused", strip(s) == [],
+ minimize_focused(s)
+ check("minimising the only pane is refused", put_away(s) == [],
str(here(s)))
check("and it says why", "nothing else" in s.snapshot().screen(),
repr(s.snapshot().screen()[-200:]))
s.api("split", dir="cols")
s.settle(20)
- s.send(r"\x01m")
- s.settle(20)
- check("with two, one can go", len(strip(s)) == 1, str(here(s)))
- s.send(r"\x01m")
- s.settle(20)
- check("but the last one standing cannot", len(strip(s)) == 1,
+ minimize_focused(s)
+ check("with two, one can go", len(put_away(s)) == 1, str(here(s)))
+ minimize_focused(s)
+ check("but the last one standing cannot", len(put_away(s)) == 1,
str(here(s)))
@@ -131,59 +172,57 @@ def test_the_button_minimises_that_pane():
s.click(b[0]["x"] + 1, b[0]["y"])
s.settle(20)
check("clicking it puts that pane away",
- [p["id"] for p in strip(s)] == [target], str(here(s)))
+ [p["id"] for p in put_away(s)] == [target], str(here(s)))
def test_it_has_no_say_once_the_tab_is_a_list():
"""Down there every pane is a row already, so being minimised is not a
- different thing to be -- which is the whole reason it costs nothing."""
+ different thing to be -- which is why it costs nothing."""
with Session(SH, cols=90, rows=20) as s:
s.settle(20)
s.api("split", dir="cols")
s.settle(20)
- s.send(r"\x01m")
- s.settle(20)
- check("one minimised, one open", len(strip(s)) == 1, str(here(s)))
+ minimize_focused(s)
+ check("one put away, one open", len(put_away(s)) == 1, str(here(s)))
- s.resize(26, 20) # narrow enough that the tab flattens
+ s.resize(26, 20)
s.settle(20)
rows = here(s)
check("the tab is a list", any(p["hidden"] for p in rows), str(rows))
- check("and the minimised pane is just another row in it",
- len([p for p in rows if p["h"] == 1]) == len(rows) - 1,
- str(rows))
+ check("and every pane is in it, minimised or not",
+ all(p["w"] > 1 for p in rows), str(rows))
s.resize(90, 20)
s.settle(20)
- check("coming back, it is minimised again and not lost",
- len(strip(s)) == 1 and len(open_panes(s)) == 1, str(here(s)))
+ check("coming back, it is put away again and not lost",
+ len(put_away(s)) == 1 and len(open_panes(s)) == 1, str(here(s)))
-def test_zoom_hides_the_strip():
+def test_zoom_hides_the_bar():
with Session(SH, cols=90, rows=20) as s:
s.settle(20)
s.api("split", dir="cols")
s.api("split", dir="rows")
s.settle(20)
- s.send(r"\x01m")
- s.settle(20)
- check("a strip to start", len(strip(s)) == 1, str(here(s)))
+ minimize_focused(s)
+ check("a bar to start", len(bar_entries(s)) == 1, str(bar_entries(s)))
s.send(r"\x01z")
s.settle(20)
- check("zooming shows one pane and nothing else, strip included",
- len([p for p in here(s) if p["w"] > 1]) == 1, str(here(s)))
+ check("zooming shows one pane and nothing else, bar included",
+ bar_entries(s) == [], str(bar_entries(s)))
s.send(r"\x01z")
s.settle(20)
- check("and unzooming gives the strip back", len(strip(s)) == 1,
- str(here(s)))
+ check("and unzooming gives the bar back", len(bar_entries(s)) == 1,
+ str(bar_entries(s)))
if __name__ == "__main__":
- test_minimising_moves_a_pane_to_the_strip()
- test_clicking_the_row_brings_it_back()
+ test_minimising_takes_a_pane_out_of_the_layout()
+ test_the_bar_is_one_row_however_many_are_put_away()
+ test_clicking_an_entry_brings_that_pane_back()
test_focusing_it_by_any_route_brings_it_back()
test_it_will_not_leave_the_tab_empty()
test_the_button_minimises_that_pane()
test_it_has_no_say_once_the_tab_is_a_list()
- test_zoom_hides_the_strip()
+ test_zoom_hides_the_bar()
sys.exit(report())
diff --git a/tests/test_zoom.py b/tests/test_zoom.py
index a5c9fba..e99499d 100644
--- a/tests/test_zoom.py
+++ b/tests/test_zoom.py
@@ -76,7 +76,7 @@ def test_the_button_toggles_and_says_which_way():
s.click(b["x"] + 1, b["y"])
s.settle(20)
check("clicking it zooms", len(visible(s)) == 1, str(s.panes()))
- check("and the mark says so", "\u25a3" in s.snapshot().line(2),
+ check("and the mark says so", "][" in s.snapshot().line(2),
repr(s.snapshot().line(2)[-14:]))
# The button moved: the pane it belongs to just became the whole tab.
@@ -85,7 +85,7 @@ def test_the_button_toggles_and_says_which_way():
s.settle(20)
check("clicking it again puts it back", len(visible(s)) == 2,
str(s.panes()))
- check("and the mark goes back too", "\u25a1" in s.snapshot().line(2),
+ check("and the mark goes back too", "[]" in s.snapshot().line(2),
repr(s.snapshot().line(2)[-14:]))