summaryrefslogtreecommitdiffstats
path: root/status.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2013-07-05 14:44:06 +0000
committerNicholas Marriott <nicm@openbsd.org>2013-07-05 14:44:06 +0000
commit7af5fec0387008c71bf29ad1e394871873acaf40 (patch)
tree8f6de82da7890a99f23dcb53a2fccb5c47fade8c /status.c
parentf884fff8693de02cea0347f1c267dbd925e3b5f5 (diff)
Whitespace nits, from Ben Boeckel.
Diffstat (limited to 'status.c')
-rw-r--r--status.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/status.c b/status.c
index ecfd7e58..c5572b74 100644
--- a/status.c
+++ b/status.c
@@ -142,10 +142,8 @@ status_set_window_at(struct client *c, u_int x)
x += c->wlmouse;
RB_FOREACH(wl, winlinks, &s->windows) {
- if (x < wl->status_width &&
- session_select(s, wl->idx) == 0) {
+ if (x < wl->status_width && session_select(s, wl->idx) == 0)
server_redraw_session(s);
- }
x -= wl->status_width + 1;
}
}
@@ -938,6 +936,7 @@ status_prompt_redraw(struct client *c)
off = 0;
memcpy(&gc, &grid_default_cell, sizeof gc);
+
/* Change colours for command mode. */
if (c->prompt_mdata.mode == 1) {
colour_set_fg(&gc, options_get_number(&s->options, "message-command-fg"));
@@ -1099,6 +1098,7 @@ status_prompt_key(struct client *c, int key)
}
break;
case MODEKEYEDIT_DELETE:
+ case MODEKEYEDIT_SWITCHMODESUBSTITUTE:
if (c->prompt_index != size) {
memmove(c->prompt_buffer + c->prompt_index,
c->prompt_buffer + c->prompt_index + 1,
@@ -1107,11 +1107,13 @@ status_prompt_key(struct client *c, int key)
}
break;
case MODEKEYEDIT_DELETELINE:
+ case MODEKEYEDIT_SWITCHMODESUBSTITUTELINE:
*c->prompt_buffer = '\0';
c->prompt_index = 0;
c->flags |= CLIENT_STATUS;
break;
case MODEKEYEDIT_DELETETOENDOFLINE:
+ case MODEKEYEDIT_SWITCHMODECHANGELINE:
if (c->prompt_index < size) {
c->prompt_buffer[c->prompt_index] = '\0';
c->flags |= CLIENT_STATUS;
@@ -1190,6 +1192,11 @@ status_prompt_key(struct client *c, int key)
break;
}
+ /* Back up to the end-of-word like vi. */
+ if (options_get_number(oo, "status-keys") == MODEKEY_VI &&
+ c->prompt_index != 0)
+ c->prompt_index--;
+
c->flags |= CLIENT_STATUS;
break;
case MODEKEYEDIT_PREVIOUSSPACE: