aboutsummaryrefslogtreecommitdiff
path: root/status.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2013-07-06 11:18:49 +0100
committerThomas Adam <thomas@xteddy.org>2013-07-06 11:18:49 +0100
commitbdea2f9eda1abc8f4a6c423af62ef7538b2ad249 (patch)
treef634639dad6a8775aa4692702b11a52f27aecac5 /status.c
parente496a548d7b07c9a4be9ce8e750cf5423e3bafe3 (diff)
parentf5b041e3949e9a129d68d9919725c3afcd81ed5a (diff)
downloadrtmux-bdea2f9eda1abc8f4a6c423af62ef7538b2ad249.tar.gz
rtmux-bdea2f9eda1abc8f4a6c423af62ef7538b2ad249.tar.bz2
rtmux-bdea2f9eda1abc8f4a6c423af62ef7538b2ad249.zip
Merge branch 'obsd-master'
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 385ec8e1..358f809c 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: