aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2020-05-08 22:09:31 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2020-05-08 22:09:31 +0100
commit5e97d79eb1337db2dd5969fb2c339d14427f545b (patch)
tree3758f15db414e1bb6e7cb417ad956b937cab60f8
parenta61cbf1c33d8d61b564f95053cbf96443126dd87 (diff)
downloadrtmux-5e97d79eb1337db2dd5969fb2c339d14427f545b.tar.gz
rtmux-5e97d79eb1337db2dd5969fb2c339d14427f545b.tar.bz2
rtmux-5e97d79eb1337db2dd5969fb2c339d14427f545b.zip
Fix some customize mode drawing nits.
-rw-r--r--key-bindings.c2
-rw-r--r--mode-tree.c3
-rw-r--r--screen-write.c2
-rw-r--r--window-customize.c6
4 files changed, 10 insertions, 3 deletions
diff --git a/key-bindings.c b/key-bindings.c
index 1847b6e6..d6a72297 100644
--- a/key-bindings.c
+++ b/key-bindings.c
@@ -278,7 +278,7 @@ key_bindings_init(void)
"bind -N 'Toggle the marked pane' m select-pane -m",
"bind -N 'Select the next window' n next-window",
"bind -N 'Select the next pane' o select-pane -t:.+",
- "bind -N 'Customizeoptions' C customize-mode",
+ "bind -N 'Customize options' C customize-mode",
"bind -N 'Select the previous pane' p previous-window",
"bind -N 'Display pane numbers' q display-panes",
"bind -N 'Redraw the current client' r refresh-client",
diff --git a/mode-tree.c b/mode-tree.c
index 8f7ba85f..8a28be16 100644
--- a/mode-tree.c
+++ b/mode-tree.c
@@ -708,7 +708,8 @@ mode_tree_draw(struct mode_tree_data *mtd)
else
screen_write_puts(&ctx, &gc0, "active");
screen_write_puts(&ctx, &gc0, ") ");
- }
+ } else
+ screen_write_puts(&ctx, &gc0, " ");
}
free(text);
diff --git a/screen-write.c b/screen-write.c
index adb53307..b168d0b6 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -428,7 +428,7 @@ screen_write_text(struct screen_write_ctx *ctx, u_int width, u_int lines,
idx = next;
}
- screen_write_cursormove(ctx, cx, s->cy + 1, 0);
+ screen_write_cursormove(ctx, cx, s->cy, 0);
free(text);
}
diff --git a/window-customize.c b/window-customize.c
index 93b2e840..e07bc243 100644
--- a/window-customize.c
+++ b/window-customize.c
@@ -494,6 +494,9 @@ window_customize_draw(void *modedata, void *itemdata,
screen_write_text(ctx, sx, sy, &grid_default_cell, "%s", text);
if (s->cy >= cy + sy - 1)
goto out;
+ screen_write_cursormove(ctx, s->cx, s->cy + 1, 0);
+ if (s->cy >= cy + sy - 1)
+ goto out;
if (oe == NULL)
text = "user";
@@ -524,6 +527,9 @@ window_customize_draw(void *modedata, void *itemdata,
if (s->cy > cy + sy - 1)
goto out;
}
+ screen_write_cursormove(ctx, s->cx, s->cy + 1, 0);
+ if (s->cy >= cy + sy - 1)
+ goto out;
value = options_to_string(o, idx, 0);
if (oe != NULL && idx == -1) {