comparison src/ex_docmd.c @ 14550:60b9b6196644 v8.1.0288

patch 8.1.0288: quickfix code uses cmdidx too often commit https://github.com/vim/vim/commit/396659592fe039decc8c088694912067fe32a681 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 15 20:59:48 2018 +0200 patch 8.1.0288: quickfix code uses cmdidx too often Problem: Quickfix code uses cmdidx too often. Solution: Add is_loclist_cmd(). (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Wed, 15 Aug 2018 21:00:06 +0200
parents 213f1a519378
children c8f07e8b273e
comparison
equal deleted inserted replaced
14549:35d1645774eb 14550:60b9b6196644
12527 end_global_changes(); 12527 end_global_changes();
12528 #endif 12528 #endif
12529 } 12529 }
12530 #endif 12530 #endif
12531 12531
12532 #ifdef FEAT_QUICKFIX
12533 /*
12534 * Returns TRUE if the supplied Ex cmdidx is for a location list command
12535 * instead of a quickfix command.
12536 */
12537 int
12538 is_loclist_cmd(int cmdidx)
12539 {
12540 if (cmdidx < 0 || cmdidx > CMD_SIZE)
12541 return FALSE;
12542 return cmdnames[cmdidx].cmd_name[0] == 'l';
12543 }
12544 #endif
12545
12532 # if defined(FEAT_TIMERS) || defined(PROTO) 12546 # if defined(FEAT_TIMERS) || defined(PROTO)
12533 int 12547 int
12534 get_pressedreturn(void) 12548 get_pressedreturn(void)
12535 { 12549 {
12536 return ex_pressedreturn; 12550 return ex_pressedreturn;