Skip to content

Commit

Permalink
chore: update backport version to upstream 13e8e2 (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesmithgh authored Jan 5, 2024
1 parent da7c576 commit 4696f08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lua/kitty-scrollback/backport/backport-sha.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"runtime/lua/vim/_system.lua": "9e8813381da9093060dfd09065499e87ac23d673a7fa53a52b6e6dfac0cd6e7e",
"runtime/lua/vim/version.lua": "d94c6888586745fb04b76037db70d5bf82e0d2a376d2e3e18bc0e162f421857d"
"runtime/lua/vim/version.lua": "13e8e24261ae88d9d9436002743801b01651552c7e2dfa720eda35b101387616"
}
5 changes: 4 additions & 1 deletion lua/kitty-scrollback/backport/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local M = {}
local function backport_version()
if type(vim.version().__tostring) ~= 'function' then
-- NOTE: copied __tostring from
-- https://github.com/neovim/neovim/blob/879617c9bbbacb0d0f778ff6dd53cc7c95794abe/runtime/lua/vim/version.lua
-- https://github.com/neovim/neovim/blob/e09adfdcffe8a94e09d834bb49f42fd725ddd47b/runtime/lua/vim/version.lua#L123

local Version = {}
function Version:__tostring()
Expand All @@ -25,6 +25,9 @@ local function backport_version()
if type(vim.version) == 'function' then -- nvim 0.8 vim.version is a table instead of function
vim.version = vim.version()
end

-- NOTE: copied setmetatable from
-- https://github.com/neovim/neovim/blob/e09adfdcffe8a94e09d834bb49f42fd725ddd47b/runtime/lua/vim/version.lua#L427
setmetatable(vim.version, {
--- Returns the current Nvim version.
__call = function()
Expand Down

0 comments on commit 4696f08

Please sign in to comment.