From 6adc2ae7e0d86f7b2a4292a666eeaa50a1473915 Mon Sep 17 00:00:00 2001 From: bfredl Date: Fri, 19 Aug 2022 12:37:58 +0200 Subject: refactor: move statusline code from buffer.c and [draw]screen.c to new file problem: code for drawing statusline is arbitrarily spreadout between drawscreen.c, screen.c and buffer.c solution: move it to a new file statusline.c - rename archaic internal name "status match" to public name "wildmenu" - showruler() does not show the ruler. it show anything which displays info about the cursor. Rename it accordingy. --- src/nvim/ex_getln.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nvim/ex_getln.c') diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index c15d85967d..776bdd935b 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -4264,7 +4264,7 @@ char_u *ExpandOne(expand_T *xp, char_u *str, char_u *orig, int options, int mode compl_selected = findex; cmdline_pum_display(false); } else if (p_wmnu) { - win_redr_status_matches(xp, xp->xp_numfiles, xp->xp_files, findex, cmd_showtail); + redraw_wildmenu(xp, xp->xp_numfiles, xp->xp_files, findex, cmd_showtail); } if (findex == -1) { return vim_strsave(orig_save); @@ -4679,7 +4679,7 @@ static int showmatches(expand_T *xp, int wildmenu) if (got_int) { got_int = false; // only int. the completion, not the cmd line } else if (wildmenu) { - win_redr_status_matches(xp, num_files, files_found, -1, showtail); + redraw_wildmenu(xp, num_files, files_found, -1, showtail); } else { // find the length of the longest file name maxlen = 0; @@ -4791,7 +4791,7 @@ static int showmatches(expand_T *xp, int wildmenu) return EXPAND_OK; } -/// Private path_tail for showmatches() (and win_redr_status_matches()): +/// Private path_tail for showmatches() (and redraw_wildmenu()): /// Find tail of file name path, but ignore trailing "/". char *sm_gettail(char *s, bool eager) { -- cgit