Skip to content

Commit

Permalink
red: | fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hugeping committed Sep 13, 2023
1 parent 09c55a6 commit 4092f2b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions data/lib/red/proc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,11 @@ proc['|'] = function(w, prog)
if not f then
return
end

f:write(data.buf:gettext(data.buf:range()))
local s, e = data.buf:range()
f:write(data.buf:gettext(s, e))
f:close()
data.buf:setsel(s, e + 1)
data.buf:cut()
pipe(w:data(), 'cat '..tmp..'|'..prog..' 2>&1', tmp)
end
end
Expand Down

0 comments on commit 4092f2b

Please sign in to comment.