aboutsummaryrefslogtreecommitdiff
path: root/vis-cmds.c
diff options
context:
space:
mode:
authorRandy Palamar <randy@rnpnr.xyz>2024-05-12 11:28:56 -0600
committerRandy Palamar <randy@rnpnr.xyz>2024-05-21 20:21:46 -0600
commit54b3babf49ac75fce78815ae1d7a19f3def69660 (patch)
tree2808906457e0e09abeac6301ff874b887ae41695 /vis-cmds.c
parent06d7681cfffbc3e982fe192db4190f124b2b0848 (diff)
downloadvis-54b3babf49ac75fce78815ae1d7a19f3def69660.tar.gz
vis-54b3babf49ac75fce78815ae1d7a19f3def69660.tar.xz
replace UiTermWin with UiWin & remove function pointers
Diffstat (limited to 'vis-cmds.c')
-rw-r--r--vis-cmds.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/vis-cmds.c b/vis-cmds.c
index 6cfc932..2b3398d 100644
--- a/vis-cmds.c
+++ b/vis-cmds.c
@@ -276,7 +276,7 @@ static bool cmd_set(Vis *vis, Win *win, Command *cmd, const char *argv[], Select
[OPTION_SHOW_EOF] = UI_OPTION_SYMBOL_EOF,
[OPTION_STATUSBAR] = UI_OPTION_STATUSBAR,
};
- int flags = view_options_get(win->view);
+ int flags = UI_OPTIONS_GET(win->view->ui);
if (arg.b || (toggle && !(flags & values[opt_index])))
flags |= values[opt_index];
else
@@ -285,7 +285,7 @@ static bool cmd_set(Vis *vis, Win *win, Command *cmd, const char *argv[], Select
break;
}
case OPTION_NUMBER: {
- enum UiOption opt = view_options_get(win->view);
+ enum UiOption opt = UI_OPTIONS_GET(win->view->ui);
if (arg.b || (toggle && !(opt & UI_OPTION_LINE_NUMBERS_ABSOLUTE))) {
opt &= ~UI_OPTION_LINE_NUMBERS_RELATIVE;
opt |= UI_OPTION_LINE_NUMBERS_ABSOLUTE;
@@ -296,7 +296,7 @@ static bool cmd_set(Vis *vis, Win *win, Command *cmd, const char *argv[], Select
break;
}
case OPTION_NUMBER_RELATIVE: {
- enum UiOption opt = view_options_get(win->view);
+ enum UiOption opt = UI_OPTIONS_GET(win->view->ui);
if (arg.b || (toggle && !(opt & UI_OPTION_LINE_NUMBERS_RELATIVE))) {
opt &= ~UI_OPTION_LINE_NUMBERS_ABSOLUTE;
opt |= UI_OPTION_LINE_NUMBERS_RELATIVE;
@@ -307,7 +307,7 @@ static bool cmd_set(Vis *vis, Win *win, Command *cmd, const char *argv[], Select
break;
}
case OPTION_CURSOR_LINE: {
- enum UiOption opt = view_options_get(win->view);
+ enum UiOption opt = UI_OPTIONS_GET(win->view->ui);
if (arg.b || (toggle && !(opt & UI_OPTION_CURSOR_LINE)))
opt |= UI_OPTION_CURSOR_LINE;
else
@@ -545,7 +545,7 @@ static bool cmd_qall(Vis *vis, Win *win, Command *cmd, const char *argv[], Selec
static bool cmd_split(Vis *vis, Win *win, Command *cmd, const char *argv[], Selection *sel, Filerange *range) {
if (!win)
return false;
- enum UiOption options = view_options_get(win->view);
+ enum UiOption options = UI_OPTIONS_GET(win->view->ui);
windows_arrange(vis, UI_LAYOUT_HORIZONTAL);
if (!argv[1])
return vis_window_split(win);
@@ -558,7 +558,7 @@ static bool cmd_split(Vis *vis, Win *win, Command *cmd, const char *argv[], Sele
static bool cmd_vsplit(Vis *vis, Win *win, Command *cmd, const char *argv[], Selection *sel, Filerange *range) {
if (!win)
return false;
- enum UiOption options = view_options_get(win->view);
+ enum UiOption options = UI_OPTIONS_GET(win->view->ui);
windows_arrange(vis, UI_LAYOUT_VERTICAL);
if (!argv[1])
return vis_window_split(win);