Compare commits
No commits in common. "24a6414d8bb1e88b9ed7e32eaa5b15ca71c3607b" and "04514459662ca87178393b35a846212a5a71c147" have entirely different histories.
24a6414d8b
...
0451445966
3 changed files with 1 additions and 38 deletions
|
|
@ -61,8 +61,7 @@ luarocks install diffs.nvim
|
||||||
Do not lazy load `diffs.nvim` with `event`, `lazy`, `ft`, `config`, or `keys` to
|
Do not lazy load `diffs.nvim` with `event`, `lazy`, `ft`, `config`, or `keys` to
|
||||||
control loading - `diffs.nvim` lazy-loads itself.
|
control loading - `diffs.nvim` lazy-loads itself.
|
||||||
|
|
||||||
**Q: Does diffs.nvim support
|
**Q: Does diffs.nvim support vim-fugitive/Neogit/neojj/gitsigns?**
|
||||||
[vim-fugitive](https://github.com/tpope/vim-fugitive)/[Neogit](https://github.com/NeogitOrg/neogit)/[neojj](https://github.com/NicholasZolton/neojj)/[gitsigns](https://github.com/lewis6991/gitsigns.nvim)?**
|
|
||||||
|
|
||||||
Yes. Enable integrations in your config:
|
Yes. Enable integrations in your config:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -347,9 +347,6 @@ end
|
||||||
---@param path string
|
---@param path string
|
||||||
---@return string[]?
|
---@return string[]?
|
||||||
local function read_file_lines(path)
|
local function read_file_lines(path)
|
||||||
if vim.fn.isdirectory(path) == 1 then
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
local f = io.open(path, 'r')
|
local f = io.open(path, 'r')
|
||||||
if not f then
|
if not f then
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
|
|
@ -165,39 +165,6 @@ describe('context', function()
|
||||||
assert.is_nil(hunks[1].context_after)
|
assert.is_nil(hunks[1].context_after)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('skips when path is a directory', function()
|
|
||||||
vim.fn.mkdir(vim.fs.joinpath(tmpdir, 'subdir'), 'p')
|
|
||||||
|
|
||||||
local hunks = {
|
|
||||||
make_hunk('subdir', {
|
|
||||||
file_new_start = 1,
|
|
||||||
file_new_count = 1,
|
|
||||||
lines = { '+x' },
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
compute_hunk_context(hunks, 25)
|
|
||||||
|
|
||||||
assert.is_nil(hunks[1].context_before)
|
|
||||||
assert.is_nil(hunks[1].context_after)
|
|
||||||
end)
|
|
||||||
|
|
||||||
it('skips when path is a symlink to a directory', function()
|
|
||||||
vim.fn.mkdir(vim.fs.joinpath(tmpdir, 'real_dir'), 'p')
|
|
||||||
vim.uv.fs_symlink(vim.fs.joinpath(tmpdir, 'real_dir'), vim.fs.joinpath(tmpdir, 'link_dir'))
|
|
||||||
|
|
||||||
local hunks = {
|
|
||||||
make_hunk('link_dir', {
|
|
||||||
file_new_start = 1,
|
|
||||||
file_new_count = 1,
|
|
||||||
lines = { '+x' },
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
compute_hunk_context(hunks, 25)
|
|
||||||
|
|
||||||
assert.is_nil(hunks[1].context_before)
|
|
||||||
assert.is_nil(hunks[1].context_after)
|
|
||||||
end)
|
|
||||||
|
|
||||||
it('skips when file does not exist on disk', function()
|
it('skips when file does not exist on disk', function()
|
||||||
local hunks = {
|
local hunks = {
|
||||||
make_hunk('nonexistent.lua', {
|
make_hunk('nonexistent.lua', {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue