From 18d7dd485be57b85308d1e47ab44ce21e7a80be3 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 29 Apr 2026 01:18:58 +0200 Subject: feat(ui): use vim.ui.select for :oldfiles, :recover Problem: followup to 55ceb314ca96 #39478 `:oldfiles` and swapfile `:recover` do not delegate to `vim.ui.select`. Solution: - Delegate to `vim.ui.select`. - Fix a long-standing `recover_names` bug where `concat_fnames(dir_name, files[i], true)` produced malformed `///` paths (also fixes `swapfilelist()`). --- src/nvim/lua/executor.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/nvim/lua/executor.c') diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index 4a747848f3..468c706014 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -167,6 +167,14 @@ static void nlua_push_cmdmod(lua_State *lstate, const cmdmod_T *cmod) lua_setfield(lstate, -2, "lockmarks"); lua_pushboolean(lstate, cmod->cmod_flags & CMOD_NOSWAPFILE); lua_setfield(lstate, -2, "noswapfile"); + + // ":filter[!] /pattern/" modifier (same shape as `nvim_parse_cmd().mods.filter`). + lua_newtable(lstate); + lua_pushstring(lstate, cmod->cmod_filter_pat ? cmod->cmod_filter_pat : ""); + lua_setfield(lstate, -2, "pattern"); + lua_pushboolean(lstate, cmod->cmod_filter_force); + lua_setfield(lstate, -2, "force"); + lua_setfield(lstate, -2, "filter"); } /// Pushes common exarg_T fields (bang, line1, line2, …) onto a table at the top of the stack. -- cgit