Skip to content

Commit

Permalink
chore(pr): auto-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
linrongbin16 authored and github-actions[bot] committed Jan 3, 2024
1 parent 5d1d808 commit 141e576
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions lua/gitlinker/commons/fileios.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ function FileLineReader:next()
if self.buffer == nil then
return nil
end
self.buffer = self.buffer:gsub("\r\n", "\n")
local nextpos = strings.find(self.buffer, "\n")
if nextpos then
local line = self.buffer:sub(1, nextpos - 1)
Expand Down
10 changes: 3 additions & 7 deletions lua/gitlinker/commons/spawn.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
local _system
if vim.fn.has("nvim-0.10") == 1 then
_system = vim.system
else
_system = require("gitlinker.commons._system").run
end

local M = {}

--- @alias commons.SpawnLineProcessor fun(line:string):any
Expand Down Expand Up @@ -108,6 +101,9 @@ M.run = function(cmd, opts, on_exit)
end
end

local _system = vim.is_callable(vim.system) and vim.system
or require("gitlinker.commons._system").run

return _system(cmd, {
cwd = opts.cwd,
env = opts.env,
Expand Down
2 changes: 1 addition & 1 deletion lua/gitlinker/commons/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.0
3.7.2

0 comments on commit 141e576

Please sign in to comment.