aboutsummaryrefslogtreecommitdiff
path: root/vis-cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'vis-cmds.c')
-rw-r--r--vis-cmds.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/vis-cmds.c b/vis-cmds.c
index 2b3398d..1515bc8 100644
--- a/vis-cmds.c
+++ b/vis-cmds.c
@@ -125,10 +125,6 @@ static bool cmd_user(Vis *vis, Win *win, Command *cmd, const char *argv[], Selec
return user && user->func(vis, win, user->data, cmd->flags == '!', argv, sel, range);
}
-static void windows_arrange(Vis *vis, enum UiLayout layout) {
- vis->ui->arrange(vis->ui, layout);
-}
-
void vis_shell_set(Vis *vis, const char *new_shell) {
char *shell = strdup(new_shell);
if (!shell) {
@@ -250,7 +246,7 @@ static bool cmd_set(Vis *vis, Win *win, Command *cmd, const char *argv[], Select
break;
case OPTION_ESCDELAY:
{
- TermKey *termkey = vis->ui->termkey_get(vis->ui);
+ TermKey *termkey = vis->ui->termkey;
termkey_set_waittime(termkey, arg.i);
break;
}
@@ -358,7 +354,7 @@ static bool cmd_set(Vis *vis, Win *win, Command *cmd, const char *argv[], Select
vis_info_show(vis, "Invalid layout `%s', expected 'h' or 'v'", arg.s);
return false;
}
- windows_arrange(vis, layout);
+ ui_arrange(vis->ui, layout);
break;
}
case OPTION_IGNORECASE:
@@ -546,7 +542,7 @@ static bool cmd_split(Vis *vis, Win *win, Command *cmd, const char *argv[], Sele
if (!win)
return false;
enum UiOption options = UI_OPTIONS_GET(win->view->ui);
- windows_arrange(vis, UI_LAYOUT_HORIZONTAL);
+ ui_arrange(vis->ui, UI_LAYOUT_HORIZONTAL);
if (!argv[1])
return vis_window_split(win);
bool ret = openfiles(vis, &argv[1]);
@@ -559,7 +555,7 @@ static bool cmd_vsplit(Vis *vis, Win *win, Command *cmd, const char *argv[], Sel
if (!win)
return false;
enum UiOption options = UI_OPTIONS_GET(win->view->ui);
- windows_arrange(vis, UI_LAYOUT_VERTICAL);
+ ui_arrange(vis->ui, UI_LAYOUT_VERTICAL);
if (!argv[1])
return vis_window_split(win);
bool ret = openfiles(vis, &argv[1]);
@@ -569,12 +565,12 @@ static bool cmd_vsplit(Vis *vis, Win *win, Command *cmd, const char *argv[], Sel
}
static bool cmd_new(Vis *vis, Win *win, Command *cmd, const char *argv[], Selection *sel, Filerange *range) {
- windows_arrange(vis, UI_LAYOUT_HORIZONTAL);
+ ui_arrange(vis->ui, UI_LAYOUT_HORIZONTAL);
return vis_window_new(vis, NULL);
}
static bool cmd_vnew(Vis *vis, Win *win, Command *cmd, const char *argv[], Selection *sel, Filerange *range) {
- windows_arrange(vis, UI_LAYOUT_VERTICAL);
+ ui_arrange(vis->ui, UI_LAYOUT_VERTICAL);
return vis_window_new(vis, NULL);
}
@@ -779,7 +775,7 @@ static void print_symbolic_keys(Vis *vis, Text *txt) {
TERMKEY_SYM_KPEQUALS,
};
- TermKey *termkey = vis->ui->termkey_get(vis->ui);
+ TermKey *termkey = vis->ui->termkey;
text_appendf(txt, " ␣ (a literal \" \" space symbol must be used to refer to <Space>)\n");
for (size_t i = 0; i < LENGTH(keys); i++) {
text_appendf(txt, " <%s>\n", termkey_get_keyname(termkey, keys[i]));