comparison src/usercmd.c @ 27018:268f6a3511df v8.2.4038

patch 8.2.4038: various code not used when features are disabled Commit: https://github.com/vim/vim/commit/748b308eebe8d8860888eb27da08333f175d547d Author: Dominique Pelle <dominique.pelle@gmail.com> Date: Sat Jan 8 12:41:16 2022 +0000 patch 8.2.4038: various code not used when features are disabled Problem: Various code not used when features are disabled. Solution: Add #ifdefs. (Dominique Pell?, closes https://github.com/vim/vim/issues/9491)
author Bram Moolenaar <Bram@vim.org>
date Sat, 08 Jan 2022 13:45:04 +0100
parents 79ea140936e9
children eebbcc83fb75
comparison
equal deleted inserted replaced
27017:da790d50f73d 27018:268f6a3511df
317 if (idx < ucmds.ga_len) 317 if (idx < ucmds.ga_len)
318 return USER_CMD(idx)->uc_name; 318 return USER_CMD(idx)->uc_name;
319 return NULL; 319 return NULL;
320 } 320 }
321 321
322 #ifdef FEAT_EVAL
322 /* 323 /*
323 * Get the name of user command "idx". "cmdidx" can be CMD_USER or 324 * Get the name of user command "idx". "cmdidx" can be CMD_USER or
324 * CMD_USER_BUF. 325 * CMD_USER_BUF.
325 * Returns NULL if the command is not found. 326 * Returns NULL if the command is not found.
326 */ 327 */
341 if (idx < buf->b_ucmds.ga_len) 342 if (idx < buf->b_ucmds.ga_len)
342 return USER_CMD_GA(&buf->b_ucmds, idx)->uc_name; 343 return USER_CMD_GA(&buf->b_ucmds, idx)->uc_name;
343 } 344 }
344 return NULL; 345 return NULL;
345 } 346 }
347 #endif
346 348
347 /* 349 /*
348 * Function given to ExpandGeneric() to obtain the list of user address type 350 * Function given to ExpandGeneric() to obtain the list of user address type
349 * names. 351 * names.
350 */ 352 */
392 get_user_cmd_complete(expand_T *xp UNUSED, int idx) 394 get_user_cmd_complete(expand_T *xp UNUSED, int idx)
393 { 395 {
394 return (char_u *)command_complete[idx].name; 396 return (char_u *)command_complete[idx].name;
395 } 397 }
396 398
399 #ifdef FEAT_EVAL
397 int 400 int
398 cmdcomplete_str_to_type(char_u *complete_str) 401 cmdcomplete_str_to_type(char_u *complete_str)
399 { 402 {
400 int i; 403 int i;
401 404
403 if (STRCMP(complete_str, command_complete[i].name) == 0) 406 if (STRCMP(complete_str, command_complete[i].name) == 0)
404 return command_complete[i].expand; 407 return command_complete[i].expand;
405 408
406 return EXPAND_NOTHING; 409 return EXPAND_NOTHING;
407 } 410 }
411 #endif
408 412
409 /* 413 /*
410 * List user commands starting with "name[name_len]". 414 * List user commands starting with "name[name_len]".
411 */ 415 */
412 static void 416 static void