summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authornanahi <130121847+na-na-hi@users.noreply.github.com>2024-04-09 10:32:46 -0400
committerKacper Michajłow <kasper93@gmail.com>2024-04-10 20:47:08 +0200
commit14462dafe494ffd707b87669bc950836e2b3d867 (patch)
tree0594810151975ae59fbc3161db732160cfb28946 /player
parentee6794225d2be8cb56afb9ba441a89d5e1319b87 (diff)
downloadmpv-14462dafe494ffd707b87669bc950836e2b3d867.tar.bz2
mpv-14462dafe494ffd707b87669bc950836e2b3d867.tar.xz
command: don't use OSD_ASS_0 when converting lists to strings
When converting a list to string for show-text, since 05c398fb6c3a48c6a72b6b0706ea0156c46b146d the OSD_ASS_0 escape hatch is used. This usage is problematic because the same format string is used for print-text, which results in these ASS escape sequences being printed in the terminal. Also since d6610a5b2f34e398e2ceba2a4da2b79e556b1c9e, the print-text output to console.lua is no longer escaped if OSD_ASS_0 is present. This results in abnormally formated text in the console output. Fix this by not using ASS escape sequences for this. Instead, use the circle symbols used by the OSC, which also results in the same width for active and inactive items.
Diffstat (limited to 'player')
-rw-r--r--player/command.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/player/command.c b/player/command.c
index 9f0af44663..31dcd7f0f9 100644
--- a/player/command.c
+++ b/player/command.c
@@ -159,12 +159,15 @@ struct load_action {
bool play;
};
-// U+279C HEAVY ROUND-TIPPED RIGHTWARDS ARROW
+// U+25CB WHITE CIRCLE
+// U+25CF BLACK CIRCLE
// U+00A0 NO-BREAK SPACE
-#define ARROW_SP "\342\236\234\302\240"
+#define WHITECIRCLE "\xe2\x97\x8b"
+#define BLACKCIRCLE "\xe2\x97\x8f"
+#define NBSP "\xc2\xa0"
-const char list_current[] = OSD_ASS_0 ARROW_SP OSD_ASS_1;
-const char list_normal[] = OSD_ASS_0 "{\\alpha&HFF}" ARROW_SP "{\\r}" OSD_ASS_1;
+const char list_current[] = BLACKCIRCLE NBSP;
+const char list_normal[] = WHITECIRCLE NBSP;
static int edit_filters(struct MPContext *mpctx, struct mp_log *log,
enum stream_type mediatype,