Skip to content

Commit

Permalink
fixed multiple lines bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobgetz committed Aug 22, 2023
1 parent 6655bcf commit 09a44a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/wat-the-wasm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ local execute = function(command)
on_exit = function(_, code)
if code == 0 then
local file_path = vim.fn.expand("%:p")
original_buffer[file_path] = table.concat(vim.fn.readfile(file_path), "\n")
original_buffer[file_path] = vim.fn.readfile(file_path)
vim.cmd(":%!" .. command)
return
end
Expand Down Expand Up @@ -49,7 +49,7 @@ M.revert = function()
return
end
local current_buffer = vim.api.nvim_get_current_buf()
vim.api.nvim_buf_set_lines(current_buffer, 0, -1, false, { original_buffer[file_path] })
vim.api.nvim_buf_set_lines(current_buffer, 0, -1, false, original_buffer[file_path])
original_buffer[file_path] = nil
end

Expand Down

0 comments on commit 09a44a6

Please sign in to comment.