Mercurial > vim
comparison src/autocmd.c @ 26189:36a1a04fcd9f v8.2.3626
patch 8.2.3626: "au! event" cannot be followed by another command
Commit: https://github.com/vim/vim/commit/b8e642f7ace5382b4dacb7a8effd86f22b828cc1
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 20 10:38:25 2021 +0000
patch 8.2.3626: "au! event" cannot be followed by another command
Problem: "au!" and "au! event" cannot be followed by another command as
documented.
Solution: When a bar is found set nextcmd.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 20 Nov 2021 11:45:04 +0100 |
parents | d4d9c7c55a5f |
children | a2e6da79274d |
comparison
equal
deleted
inserted
replaced
26188:e93ac00a5491 | 26189:36a1a04fcd9f |
---|---|
843 int i; | 843 int i; |
844 int flags = 0; | 844 int flags = 0; |
845 | 845 |
846 if (*arg == '|') | 846 if (*arg == '|') |
847 { | 847 { |
848 eap->nextcmd = arg + 1; | |
848 arg = (char_u *)""; | 849 arg = (char_u *)""; |
849 group = AUGROUP_ALL; // no argument, use all groups | 850 group = AUGROUP_ALL; // no argument, use all groups |
850 } | 851 } |
851 else | 852 else |
852 { | 853 { |
867 return; | 868 return; |
868 | 869 |
869 pat = skipwhite(pat); | 870 pat = skipwhite(pat); |
870 if (*pat == '|') | 871 if (*pat == '|') |
871 { | 872 { |
873 eap->nextcmd = pat + 1; | |
872 pat = (char_u *)""; | 874 pat = (char_u *)""; |
873 cmd = (char_u *)""; | 875 cmd = (char_u *)""; |
874 } | 876 } |
875 else | 877 else |
876 { | 878 { |