msg: allow to truncate the message to terminal width

This commit is contained in:
Kacper Michajłow
2024-09-23 02:13:17 +02:00
parent 95f0046309
commit bf025cd289
9 changed files with 106 additions and 15 deletions

View File

@@ -2926,6 +2926,12 @@ static int mp_property_osd_ass(void *ctx, struct m_property *prop,
return m_property_read_sub(props, action, arg);
}
static int mp_property_term_clip(void *ctx, struct m_property *prop,
int action, void *arg)
{
return m_property_strdup_ro(action, arg, TERM_MSG_0);
}
static int mp_property_term_size(void *ctx, struct m_property *prop,
int action, void *arg)
{
@@ -4159,6 +4165,8 @@ static const struct m_property mp_properties_base[] = {
{"osd-sym-cc", mp_property_osd_sym},
{"osd-ass-cc", mp_property_osd_ass},
{"term-clip-cc", mp_property_term_clip},
{"mouse-pos", mp_property_mouse_pos},
{"touch-pos", mp_property_touch_pos},