Skip to content

Commit

Permalink
Replace nvim_exec with nvim_exec2
Browse files Browse the repository at this point in the history
  • Loading branch information
planet36 committed Apr 8, 2023
1 parent 0ddaebf commit 6d5985e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions link/.config/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ require("abbrev")
-- {{{ Diff

function get_colorscheme()
-- https://neovim.io/doc/user/api.html#nvim_exec()
-- https://neovim.io/doc/user/api.html#nvim_exec2()
-- XXX: vim.cmd.colorscheme() prints (not returns) the current colorscheme.
return vim.api.nvim_exec("colorscheme", true)
return vim.api.nvim_exec2("colorscheme", {output = true}).output
end

-- Count the windows in the current tabpage for which diff is true.
Expand Down

0 comments on commit 6d5985e

Please sign in to comment.