Executor: fallback to old style tooltips if stderr is empty
This commit is contained in:
parent
dafe9824e3
commit
cbe31981b3
1 changed files with 6 additions and 4 deletions
|
@ -794,11 +794,13 @@ 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;
|
||||||
|
if (*start) {
|
||||||
execp->backend->tooltip = strdup(start);
|
execp->backend->tooltip = strdup(start);
|
||||||
rstrip(execp->backend->tooltip);
|
rstrip(execp->backend->tooltip);
|
||||||
if (strlen(execp->backend->tooltip) > MAX_TOOLTIP_LEN)
|
if (strlen(execp->backend->tooltip) > MAX_TOOLTIP_LEN)
|
||||||
execp->backend->tooltip[MAX_TOOLTIP_LEN] = '\0';
|
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';
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue