diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-03-02 12:10:59 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-03-02 12:10:59 +0100 |
| commit | 2d38e9454e39a69be77e1aca64bd212e80c98aed (patch) | |
| tree | a9655044aeb168c2ca2e519c0e416e96d687c9a1 /vis-cmds.c | |
| parent | 57e38835499a2051953c4d2e1901996fd69d7080 (diff) | |
| download | vis-2d38e9454e39a69be77e1aca64bd212e80c98aed.tar.gz vis-2d38e9454e39a69be77e1aca64bd212e80c98aed.tar.xz | |
vis: remove :bdelete command
It does not really fit into the style of the rest of
the command language. Eventually we should be able
to express this kind of thing using a looping construct
based on the `X` and `Y` commands.
Diffstat (limited to 'vis-cmds.c')
| -rw-r--r-- | vis-cmds.c | 18 |
1 files changed, 0 insertions, 18 deletions
@@ -447,24 +447,6 @@ static bool cmd_quit(Vis *vis, Win *win, Command *cmd, const char *argv[], Curso return true; } -static bool cmd_bdelete(Vis *vis, Win *win, Command *cmd, const char *argv[], Cursor *cur, Filerange *range) { - if (!win) - return false; - Text *txt = win->file->text; - if (text_modified(txt) && cmd->flags != '!') { - info_unsaved_changes(vis); - return false; - } - for (Win *next, *win = vis->windows; win; win = next) { - next = win->next; - if (win->file->text == txt) - vis_window_close(win); - } - if (!has_windows(vis)) - vis_exit(vis, EXIT_SUCCESS); - return true; -} - static bool cmd_qall(Vis *vis, Win *win, Command *cmd, const char *argv[], Cursor *cur, Filerange *range) { for (Win *next, *win = vis->windows; win; win = next) { next = win->next; |
