Executor: fallback to old style tooltips if stderr is empty
This commit is contained in:
@@ -794,10 +794,12 @@ gboolean read_execp(void *obj)
|
|||||||
start += strlen(ansi_clear_screen);
|
start += strlen(ansi_clear_screen);
|
||||||
else
|
else
|
||||||
start = execp->backend->buf_stderr;
|
start = execp->backend->buf_stderr;
|
||||||
execp->backend->tooltip = strdup(start);
|
if (*start) {
|
||||||
rstrip(execp->backend->tooltip);
|
execp->backend->tooltip = strdup(start);
|
||||||
if (strlen(execp->backend->tooltip) > MAX_TOOLTIP_LEN)
|
rstrip(execp->backend->tooltip);
|
||||||
execp->backend->tooltip[MAX_TOOLTIP_LEN] = '\0';
|
if (strlen(execp->backend->tooltip) > MAX_TOOLTIP_LEN)
|
||||||
|
execp->backend->tooltip[MAX_TOOLTIP_LEN] = '\0';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
execp->backend->buf_stderr_length = 0;
|
execp->backend->buf_stderr_length = 0;
|
||||||
execp->backend->buf_stderr[execp->backend->buf_stderr_length] = '\0';
|
execp->backend->buf_stderr[execp->backend->buf_stderr_length] = '\0';
|
||||||
|
|||||||
Reference in New Issue
Block a user