comparison src/cmdexpand.c @ 28757:add09d468c0d v8.2.4903

patch 8.2.4903: cannot get the current cmdline completion type and position Commit: https://github.com/vim/vim/commit/79d599b8772022af1d657f368c2fc97aa342c0da Author: Shougo Matsushita <Shougo.Matsu@gmail.com> Date: Sat May 7 12:48:29 2022 +0100 patch 8.2.4903: cannot get the current cmdline completion type and position Problem: Cannot get the current cmdline completion type and position. Solution: Add getcmdcompltype() and getcmdscreenpos(). (Shougo Matsushita, closes #10344)
author Bram Moolenaar <Bram@vim.org>
date Sat, 07 May 2022 14:00:02 +0200
parents 96d53065f309
children fd5942a62312
comparison
equal deleted inserted replaced
28756:36c80bb26e62 28757:add09d468c0d
13 13
14 #include "vim.h" 14 #include "vim.h"
15 15
16 static int cmd_showtail; // Only show path tail in lists ? 16 static int cmd_showtail; // Only show path tail in lists ?
17 17
18 static void set_expand_context(expand_T *xp);
19 static int ExpandGeneric(char_u *pat, expand_T *xp, regmatch_T *regmatch, 18 static int ExpandGeneric(char_u *pat, expand_T *xp, regmatch_T *regmatch,
20 char_u ***matches, int *numMatches, 19 char_u ***matches, int *numMatches,
21 char_u *((*func)(expand_T *, int)), int escaped); 20 char_u *((*func)(expand_T *, int)), int escaped);
22 static int ExpandFromContext(expand_T *xp, char_u *, char_u ***, int *, int); 21 static int ExpandFromContext(expand_T *xp, char_u *, char_u ***, int *, int);
23 static int expand_showtail(expand_T *xp); 22 static int expand_showtail(expand_T *xp);
1228 * EXPAND_EXPRESSION Complete internal or user defined function/variable 1227 * EXPAND_EXPRESSION Complete internal or user defined function/variable
1229 * names in expressions, eg :while s^I 1228 * names in expressions, eg :while s^I
1230 * EXPAND_ENV_VARS Complete environment variable names 1229 * EXPAND_ENV_VARS Complete environment variable names
1231 * EXPAND_USER Complete user names 1230 * EXPAND_USER Complete user names
1232 */ 1231 */
1233 static void 1232 void
1234 set_expand_context(expand_T *xp) 1233 set_expand_context(expand_T *xp)
1235 { 1234 {
1236 cmdline_info_T *ccline = get_cmdline_info(); 1235 cmdline_info_T *ccline = get_cmdline_info();
1237 1236
1238 // only expansion for ':', '>' and '=' command-lines 1237 // only expansion for ':', '>' and '=' command-lines