diff options
Diffstat (limited to 'vis.c')
| -rw-r--r-- | vis.c | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -317,8 +317,12 @@ static void insert_newline(const Arg *arg); static void openline(const Arg *arg); /* join the line where the cursor currently is with the one above or below */ static void joinline(const Arg *arg); +/* create a new window with the filename arg->s */ +static void winnew(const Arg *arg); +/* close currently focused window except if there are unsafed changes */ +static void winclose(const Arg *arg); /* split current window horizontally (default) or vertically (if arg->b is set) */ -static void split(const Arg *arg); +static void winsplit(const Arg *arg); /* perform last action i.e. action_prev again */ static void repeat(const Arg *arg); /* replace character at cursor with one read form keyboard */ @@ -675,11 +679,19 @@ static void quit(const Arg *arg) { running = false; } -static void split(const Arg *arg) { +static void winnew(const Arg *arg) { + editor_window_new(vis, arg->s); +} + +static void winclose(const Arg *arg) { + cmd_quit((const char*[]){ "q", NULL }); +} + +static void winsplit(const Arg *arg) { if (arg->b) - editor_window_vsplit(vis, arg->s); + editor_window_vsplit(vis, NULL); else - editor_window_split(vis, arg->s); + editor_window_split(vis, NULL); } static void cursor(const Arg *arg) { |
