Show [moerx] in status bar when using --no-cwd
This commit is contained in:
parent
208d453631
commit
2fef459237
1 changed files with 9 additions and 5 deletions
14
moerx.c
14
moerx.c
|
|
@ -1821,11 +1821,15 @@ static void status_draw(Grid *g, Session *s, Client *c) {
|
||||||
int need = s->w - right_len;
|
int need = s->w - right_len;
|
||||||
int start = need - total;
|
int start = need - total;
|
||||||
int left_len = 0;
|
int left_len = 0;
|
||||||
if (s->show_cwd) {
|
{
|
||||||
char cwd[PATH_MAX];
|
char left[PATH_MAX];
|
||||||
if (!status_cwd(s, cwd, sizeof cwd))
|
if (s->show_cwd) {
|
||||||
status_cwd_home(cwd, sizeof cwd);
|
if (!status_cwd(s, left, sizeof left))
|
||||||
left_len = status_cwd_draw(g, y, cwd, start);
|
status_cwd_home(left, sizeof left);
|
||||||
|
} else {
|
||||||
|
snprintf(left, sizeof left, "moerx");
|
||||||
|
}
|
||||||
|
left_len = status_cwd_draw(g, y, left, start);
|
||||||
if (start < left_len) start = left_len;
|
if (start < left_len) start = left_len;
|
||||||
}
|
}
|
||||||
if (start < 0) start = 0;
|
if (start < 0) start = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue