comparison src/vim.h @ 13446:b18e5f37c44b v8.0.1597

patch 8.0.1597: autocommand events are not sorted commit https://github.com/vim/vim/commit/e87303af3236b8fb5e1e3be4d0e2209344fbf8b2 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 11 17:02:12 2018 +0100 patch 8.0.1597: autocommand events are not sorted Problem: Autocommand events are not sorted. Solution: Sort the autocommand events.
author Christian Brabandt <cb@256bit.org>
date Sun, 11 Mar 2018 17:15:06 +0100
parents 9f06f7aca74c
children 6faef782f50b
comparison
equal deleted inserted replaced
13445:bc3a1b4f9de3 13446:b18e5f37c44b
1249 * Events for autocommands. 1249 * Events for autocommands.
1250 */ 1250 */
1251 enum auto_event 1251 enum auto_event
1252 { 1252 {
1253 EVENT_BUFADD = 0, /* after adding a buffer to the buffer list */ 1253 EVENT_BUFADD = 0, /* after adding a buffer to the buffer list */
1254 EVENT_BUFNEW, /* after creating any buffer */
1255 EVENT_BUFDELETE, /* deleting a buffer from the buffer list */ 1254 EVENT_BUFDELETE, /* deleting a buffer from the buffer list */
1256 EVENT_BUFWIPEOUT, /* just before really deleting a buffer */
1257 EVENT_BUFENTER, /* after entering a buffer */ 1255 EVENT_BUFENTER, /* after entering a buffer */
1258 EVENT_BUFFILEPOST, /* after renaming a buffer */ 1256 EVENT_BUFFILEPOST, /* after renaming a buffer */
1259 EVENT_BUFFILEPRE, /* before renaming a buffer */ 1257 EVENT_BUFFILEPRE, /* before renaming a buffer */
1258 EVENT_BUFHIDDEN, /* just after buffer becomes hidden */
1260 EVENT_BUFLEAVE, /* before leaving a buffer */ 1259 EVENT_BUFLEAVE, /* before leaving a buffer */
1260 EVENT_BUFNEW, /* after creating any buffer */
1261 EVENT_BUFNEWFILE, /* when creating a buffer for a new file */ 1261 EVENT_BUFNEWFILE, /* when creating a buffer for a new file */
1262 EVENT_BUFREADCMD, /* read buffer using command */
1262 EVENT_BUFREADPOST, /* after reading a buffer */ 1263 EVENT_BUFREADPOST, /* after reading a buffer */
1263 EVENT_BUFREADPRE, /* before reading a buffer */ 1264 EVENT_BUFREADPRE, /* before reading a buffer */
1264 EVENT_BUFREADCMD, /* read buffer using command */
1265 EVENT_BUFUNLOAD, /* just before unloading a buffer */ 1265 EVENT_BUFUNLOAD, /* just before unloading a buffer */
1266 EVENT_BUFHIDDEN, /* just after buffer becomes hidden */
1267 EVENT_BUFWINENTER, /* after showing a buffer in a window */ 1266 EVENT_BUFWINENTER, /* after showing a buffer in a window */
1268 EVENT_BUFWINLEAVE, /* just after buffer removed from window */ 1267 EVENT_BUFWINLEAVE, /* just after buffer removed from window */
1268 EVENT_BUFWIPEOUT, /* just before really deleting a buffer */
1269 EVENT_BUFWRITECMD, /* write buffer using command */
1269 EVENT_BUFWRITEPOST, /* after writing a buffer */ 1270 EVENT_BUFWRITEPOST, /* after writing a buffer */
1270 EVENT_BUFWRITEPRE, /* before writing a buffer */ 1271 EVENT_BUFWRITEPRE, /* before writing a buffer */
1271 EVENT_BUFWRITECMD, /* write buffer using command */
1272 EVENT_CMDLINECHANGED, /* command line was modified*/ 1272 EVENT_CMDLINECHANGED, /* command line was modified*/
1273 EVENT_CMDLINEENTER, /* after entering the command line */ 1273 EVENT_CMDLINEENTER, /* after entering the command line */
1274 EVENT_CMDLINELEAVE, /* before leaving the command line */ 1274 EVENT_CMDLINELEAVE, /* before leaving the command line */
1275 EVENT_CMDUNDEFINED, /* command undefined */
1275 EVENT_CMDWINENTER, /* after entering the cmdline window */ 1276 EVENT_CMDWINENTER, /* after entering the cmdline window */
1276 EVENT_CMDWINLEAVE, /* before leaving the cmdline window */ 1277 EVENT_CMDWINLEAVE, /* before leaving the cmdline window */
1277 EVENT_COLORSCHEME, /* after loading a colorscheme */ 1278 EVENT_COLORSCHEME, /* after loading a colorscheme */
1278 EVENT_COMPLETEDONE, /* after finishing insert complete */ 1279 EVENT_COMPLETEDONE, /* after finishing insert complete */
1279 EVENT_DIRCHANGED, /* after changing directory as a result of user cmd */ 1280 EVENT_CURSORHOLD, /* cursor in same position for a while */
1281 EVENT_CURSORHOLDI, /* idem, in Insert mode */
1282 EVENT_CURSORMOVED, /* cursor was moved */
1283 EVENT_CURSORMOVEDI, /* cursor was moved in Insert mode */
1284 EVENT_DIRCHANGED, /* after user changed directory */
1285 EVENT_ENCODINGCHANGED, /* after changing the 'encoding' option */
1280 EVENT_EXITPRE, /* before exiting */ 1286 EVENT_EXITPRE, /* before exiting */
1287 EVENT_FILEAPPENDCMD, /* append to a file using command */
1281 EVENT_FILEAPPENDPOST, /* after appending to a file */ 1288 EVENT_FILEAPPENDPOST, /* after appending to a file */
1282 EVENT_FILEAPPENDPRE, /* before appending to a file */ 1289 EVENT_FILEAPPENDPRE, /* before appending to a file */
1283 EVENT_FILEAPPENDCMD, /* append to a file using command */ 1290 EVENT_FILECHANGEDRO, /* before first change to read-only file */
1284 EVENT_FILECHANGEDSHELL, /* after shell command that changed file */ 1291 EVENT_FILECHANGEDSHELL, /* after shell command that changed file */
1285 EVENT_FILECHANGEDSHELLPOST, /* after (not) reloading changed file */ 1292 EVENT_FILECHANGEDSHELLPOST, /* after (not) reloading changed file */
1286 EVENT_FILECHANGEDRO, /* before first change to read-only file */ 1293 EVENT_FILEREADCMD, /* read from a file using command */
1287 EVENT_FILEREADPOST, /* after reading a file */ 1294 EVENT_FILEREADPOST, /* after reading a file */
1288 EVENT_FILEREADPRE, /* before reading a file */ 1295 EVENT_FILEREADPRE, /* before reading a file */
1289 EVENT_FILEREADCMD, /* read from a file using command */
1290 EVENT_FILETYPE, /* new file type detected (user defined) */ 1296 EVENT_FILETYPE, /* new file type detected (user defined) */
1297 EVENT_FILEWRITECMD, /* write to a file using command */
1291 EVENT_FILEWRITEPOST, /* after writing a file */ 1298 EVENT_FILEWRITEPOST, /* after writing a file */
1292 EVENT_FILEWRITEPRE, /* before writing a file */ 1299 EVENT_FILEWRITEPRE, /* before writing a file */
1293 EVENT_FILEWRITECMD, /* write to a file using command */
1294 EVENT_FILTERREADPOST, /* after reading from a filter */ 1300 EVENT_FILTERREADPOST, /* after reading from a filter */
1295 EVENT_FILTERREADPRE, /* before reading from a filter */ 1301 EVENT_FILTERREADPRE, /* before reading from a filter */
1296 EVENT_FILTERWRITEPOST, /* after writing to a filter */ 1302 EVENT_FILTERWRITEPOST, /* after writing to a filter */
1297 EVENT_FILTERWRITEPRE, /* before writing to a filter */ 1303 EVENT_FILTERWRITEPRE, /* before writing to a filter */
1298 EVENT_FOCUSGAINED, /* got the focus */ 1304 EVENT_FOCUSGAINED, /* got the focus */
1299 EVENT_FOCUSLOST, /* lost the focus to another app */ 1305 EVENT_FOCUSLOST, /* lost the focus to another app */
1306 EVENT_FUNCUNDEFINED, /* if calling a function which doesn't exist */
1300 EVENT_GUIENTER, /* after starting the GUI */ 1307 EVENT_GUIENTER, /* after starting the GUI */
1301 EVENT_GUIFAILED, /* after starting the GUI failed */ 1308 EVENT_GUIFAILED, /* after starting the GUI failed */
1302 EVENT_INSERTCHANGE, /* when changing Insert/Replace mode */ 1309 EVENT_INSERTCHANGE, /* when changing Insert/Replace mode */
1310 EVENT_INSERTCHARPRE, /* before inserting a char */
1303 EVENT_INSERTENTER, /* when entering Insert mode */ 1311 EVENT_INSERTENTER, /* when entering Insert mode */
1304 EVENT_INSERTLEAVE, /* when leaving Insert mode */ 1312 EVENT_INSERTLEAVE, /* when leaving Insert mode */
1305 EVENT_MENUPOPUP, /* just before popup menu is displayed */ 1313 EVENT_MENUPOPUP, /* just before popup menu is displayed */
1314 EVENT_OPTIONSET, /* option was set */
1306 EVENT_QUICKFIXCMDPOST, /* after :make, :grep etc. */ 1315 EVENT_QUICKFIXCMDPOST, /* after :make, :grep etc. */
1307 EVENT_QUICKFIXCMDPRE, /* before :make, :grep etc. */ 1316 EVENT_QUICKFIXCMDPRE, /* before :make, :grep etc. */
1308 EVENT_QUITPRE, /* before :quit */ 1317 EVENT_QUITPRE, /* before :quit */
1318 EVENT_REMOTEREPLY, /* upon string reception from a remote vim */
1309 EVENT_SESSIONLOADPOST, /* after loading a session file */ 1319 EVENT_SESSIONLOADPOST, /* after loading a session file */
1320 EVENT_SHELLCMDPOST, /* after ":!cmd" */
1321 EVENT_SHELLFILTERPOST, /* after ":1,2!cmd", ":w !cmd", ":r !cmd". */
1322 EVENT_SOURCECMD, /* sourcing a Vim script using command */
1323 EVENT_SOURCEPRE, /* before sourcing a Vim script */
1324 EVENT_SPELLFILEMISSING, /* spell file missing */
1310 EVENT_STDINREADPOST, /* after reading from stdin */ 1325 EVENT_STDINREADPOST, /* after reading from stdin */
1311 EVENT_STDINREADPRE, /* before reading from stdin */ 1326 EVENT_STDINREADPRE, /* before reading from stdin */
1327 EVENT_SWAPEXISTS, /* found existing swap file */
1312 EVENT_SYNTAX, /* syntax selected */ 1328 EVENT_SYNTAX, /* syntax selected */
1329 EVENT_TABCLOSED, /* after closing a tab page */
1330 EVENT_TABENTER, /* after entering a tab page */
1331 EVENT_TABLEAVE, /* before leaving a tab page */
1332 EVENT_TABNEW, /* when entering a new tab page */
1313 EVENT_TERMCHANGED, /* after changing 'term' */ 1333 EVENT_TERMCHANGED, /* after changing 'term' */
1334 EVENT_TERMINALOPEN, /* after a terminal buffer was created */
1314 EVENT_TERMRESPONSE, /* after setting "v:termresponse" */ 1335 EVENT_TERMRESPONSE, /* after setting "v:termresponse" */
1336 EVENT_TEXTCHANGED, /* text was modified not in Insert mode */
1337 EVENT_TEXTCHANGEDI, /* text was modified in Insert mode */
1338 EVENT_TEXTCHANGEDP, /* TextChangedI with popup menu visible */
1339 EVENT_TEXTYANKPOST, /* after some text was yanked */
1315 EVENT_USER, /* user defined autocommand */ 1340 EVENT_USER, /* user defined autocommand */
1316 EVENT_VIMENTER, /* after starting Vim */ 1341 EVENT_VIMENTER, /* after starting Vim */
1317 EVENT_VIMLEAVE, /* before exiting Vim */ 1342 EVENT_VIMLEAVE, /* before exiting Vim */
1318 EVENT_VIMLEAVEPRE, /* before exiting Vim and writing .viminfo */ 1343 EVENT_VIMLEAVEPRE, /* before exiting Vim and writing .viminfo */
1319 EVENT_VIMRESIZED, /* after Vim window was resized */ 1344 EVENT_VIMRESIZED, /* after Vim window was resized */
1320 EVENT_WINENTER, /* after entering a window */ 1345 EVENT_WINENTER, /* after entering a window */
1321 EVENT_WINLEAVE, /* before leaving a window */ 1346 EVENT_WINLEAVE, /* before leaving a window */
1322 EVENT_WINNEW, /* when entering a new window */ 1347 EVENT_WINNEW, /* when entering a new window */
1323 EVENT_ENCODINGCHANGED, /* after changing the 'encoding' option */ 1348
1324 EVENT_INSERTCHARPRE, /* before inserting a char */
1325 EVENT_CURSORHOLD, /* cursor in same position for a while */
1326 EVENT_CURSORHOLDI, /* idem, in Insert mode */
1327 EVENT_FUNCUNDEFINED, /* if calling a function which doesn't exist */
1328 EVENT_REMOTEREPLY, /* upon string reception from a remote vim */
1329 EVENT_SWAPEXISTS, /* found existing swap file */
1330 EVENT_SOURCEPRE, /* before sourcing a Vim script */
1331 EVENT_SOURCECMD, /* sourcing a Vim script using command */
1332 EVENT_SPELLFILEMISSING, /* spell file missing */
1333 EVENT_CURSORMOVED, /* cursor was moved */
1334 EVENT_CURSORMOVEDI, /* cursor was moved in Insert mode */
1335 EVENT_TABENTER, /* after entering a tab page */
1336 EVENT_TABLEAVE, /* before leaving a tab page */
1337 EVENT_TABNEW, /* when entering a new tab page */
1338 EVENT_TABCLOSED, /* after closing a tab page */
1339 EVENT_SHELLCMDPOST, /* after ":!cmd" */
1340 EVENT_SHELLFILTERPOST, /* after ":1,2!cmd", ":w !cmd", ":r !cmd". */
1341 EVENT_TEXTCHANGED, /* text was modified not in Insert mode */
1342 EVENT_TEXTCHANGEDI, /* text was modified in Insert mode without
1343 popup menu visible */
1344 EVENT_TEXTCHANGEDP, /* text was modified in Insert mode with popup
1345 menu visible */
1346 EVENT_CMDUNDEFINED, /* command undefined */
1347 EVENT_OPTIONSET, /* option was set */
1348 EVENT_TEXTYANKPOST, /* after some text was yanked */
1349 EVENT_TERMINALOPEN, /* after a terminal buffer was created */
1350 NUM_EVENTS /* MUST be the last one */ 1349 NUM_EVENTS /* MUST be the last one */
1351 }; 1350 };
1352 1351
1353 typedef enum auto_event event_T; 1352 typedef enum auto_event event_T;
1354 1353