diff options
author | lonerover <pathfinder1644@yahoo.com> | 2017-01-09 12:15:10 +0800 |
---|---|---|
committer | lonerover <pathfinder1644@yahoo.com> | 2017-01-09 12:23:25 +0800 |
commit | a584375e9ffa3804077ec8cedfe8b090c1c11f7a (patch) | |
tree | 00fa5b2438ed460d71ec4d7e4ae648db19364ac9 /src/nvim/fileio.c | |
parent | f8f04350bd07bc0f3e6f618bc6c8ff4d7ce3d5ac (diff) | |
download | rneovim-a584375e9ffa3804077ec8cedfe8b090c1c11f7a.tar.gz rneovim-a584375e9ffa3804077ec8cedfe8b090c1c11f7a.tar.bz2 rneovim-a584375e9ffa3804077ec8cedfe8b090c1c11f7a.zip |
vim-patch:7.4.2314
Problem: No error when deleting an augroup while it's the current one.
Solution: Disallow deleting an augroup when it's the current one.
https://github.com/vim/vim/commit/de653f08805dde14424d417502a0480a6ad292f8
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index dbe4a144df..e10f7fd2a2 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -5581,6 +5581,8 @@ static void au_del_group(char_u *name) i = au_find_group(name); if (i == AUGROUP_ERROR) { // the group doesn't exist EMSG2(_("E367: No such group: \"%s\""), name); + } else if (i == current_augroup) { + EMSG(_("E936: Cannot delete the current group")); } else { event_T event; AutoPat *ap; |