Skip to content

Commit

Permalink
complete-word: use pipe_buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
git-bruh committed Apr 6, 2024
1 parent 604f1fe commit 72b2802
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lua/plugins/complete-word.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ vis:map(vis.modes.INSERT, "<C-n>", function()
if #candidates == 1 and candidates[1] == "\n" then return end
candidates = table.concat(candidates, "\n")

local cmd = "printf '" .. candidates .. "' | sort -u | vis-menu"
local status, out, err = vis:pipe(cmd)
local status, out, err = vis:pipe_buffer(candidates, "sort -u | vis-menu")
if status ~= 0 or not out then
if err then vis:info(err) end
return
Expand Down

0 comments on commit 72b2802

Please sign in to comment.