aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2026-04-29 01:18:58 +0200
committerJustin M. Keyes <justinkz@gmail.com>2026-04-30 17:44:31 +0200
commit18d7dd485be57b85308d1e47ab44ce21e7a80be3 (patch)
tree65a0bf0c05e75a30db973a8e9c4b0d41a2679b64 /src/nvim/lua/executor.c
parent6a87ef75b3f141e175399e87c5518ec11102877d (diff)
downloadrneovim-18d7dd485be57b85308d1e47ab44ce21e7a80be3.tar.gz
rneovim-18d7dd485be57b85308d1e47ab44ce21e7a80be3.tar.bz2
rneovim-18d7dd485be57b85308d1e47ab44ce21e7a80be3.zip
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 `<dir>//<dir>/<file>` paths (also fixes `swapfilelist()`).
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r--src/nvim/lua/executor.c8
1 files changed, 8 insertions, 0 deletions
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.