diff options
| author | TJ DeVries <devries.timothyj@gmail.com> | 2020-10-08 23:48:29 -0400 |
|---|---|---|
| committer | TJ DeVries <devries.timothyj@gmail.com> | 2020-10-08 23:48:29 -0400 |
| commit | ad12bf03d12660d04bb9d5fa13cc057e98a2ace4 (patch) | |
| tree | bc892c46116c69c39061bfaa09a12674cb9c98e5 /lua/tests/manual/auto_picker.lua | |
| parent | 8c0f2630a00c97e62552203487494329332cdd14 (diff) | |
feat: Add a test file
Diffstat (limited to 'lua/tests/manual/auto_picker.lua')
| -rw-r--r-- | lua/tests/manual/auto_picker.lua | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lua/tests/manual/auto_picker.lua b/lua/tests/manual/auto_picker.lua index 141eee4..e0433f9 100644 --- a/lua/tests/manual/auto_picker.lua +++ b/lua/tests/manual/auto_picker.lua @@ -1,15 +1,14 @@ RELOAD('telescope') -local actions = require('telescope.actions') local finders = require('telescope.finders') local make_entry = require('telescope.make_entry') local previewers = require('telescope.previewers') local pickers = require('telescope.pickers') local sorters = require('telescope.sorters') -local utils = require('telescope.utils') local find_files = function(opts) opts = opts or {} + opts.prompt_prefix = '' local find_command = opts.find_command @@ -56,8 +55,9 @@ local find_files = function(opts) count = count + 1 end) - local feed = function(text) - vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(text, true, false, true), 'n', true) + local feed = function(text, feed_opts) + feed_opts = feed_opts or 'n' + vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(text, true, false, true), feed_opts, true) end p:register_completion_callback(coroutine.wrap(function() @@ -68,10 +68,9 @@ local find_files = function(opts) end vim.wait(300, function() end) + feed("<CR>", '') - vim.cmd [[:q]] - vim.cmd [[:Messages]] - vim.cmd [[stopinsert]] + coroutine.yield() end)) p:find() |
