comparison src/fileio.c @ 10086:1de911ef1edf v7.4.2314

commit https://github.com/vim/vim/commit/de653f08805dde14424d417502a0480a6ad292f8 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 3 16:59:06 2016 +0200 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.
author Christian Brabandt <cb@256bit.org>
date Sat, 03 Sep 2016 17:00:07 +0200
parents 3e410e6e1986
children fb1fde4fcff7
comparison
equal deleted inserted replaced
10085:f7a4267983a4 10086:1de911ef1edf
8015 int i; 8015 int i;
8016 8016
8017 i = au_find_group(name); 8017 i = au_find_group(name);
8018 if (i == AUGROUP_ERROR) /* the group doesn't exist */ 8018 if (i == AUGROUP_ERROR) /* the group doesn't exist */
8019 EMSG2(_("E367: No such group: \"%s\""), name); 8019 EMSG2(_("E367: No such group: \"%s\""), name);
8020 else if (i == current_augroup)
8021 EMSG(_("E936: Cannot delete the current group"));
8020 else 8022 else
8021 { 8023 {
8022 event_T event; 8024 event_T event;
8023 AutoPat *ap; 8025 AutoPat *ap;
8024 int in_use = FALSE; 8026 int in_use = FALSE;