Comments (10)
Getting this issue as well. I'll add that I'm using diffview
and if I run :DiffviewOpen
then I don't see this issue
from neogit.
Same here. I am using diffiview.nvim, too, and I don't see this when calling :DiffviewOpen
manually.
from neogit.
hmm... I get this both with neogit and diffview
edit: that only happens when I open diffview after opening neogit diff
from neogit.
Yes, exactly. When I open diffview separately (without going through neogit), then everything looks fine and as expected. The issue reported here happens only when I first open neogit, and then use a neogit sub-command like dd
to then open diffview from neogit.
from neogit.
I bet this is a \n
vs \r\n
issue? but I'm on a mac and don't work with windows devs so 🤷
from neogit.
I am having the same problem and I am using it on linux.
After debugging a while, looks the problem is related trim() https://github.com/NeogitOrg/neogit/blob/master/lua/neogit/lib/git/cli.lua#L1003
It seems empty line is removed by trim()
After I put {trim = false} to https://github.com/NeogitOrg/neogit/blob/master/lua/neogit/integrations/diffview.lua#L97
like
local fdata = neogit.cli.show.file(path).call_sync({ trim = false }).stdout
The problem is gone.
from neogit.
Hmm, After applying my change, it shows empty line at the last line.
Maybe it is related to https://neovim.io/doc/user/channel.html#on_stdout
The callback is invoked immediately as data is available, where a single-item list [''] indicates EOF (stream closed).
But I'm not sure. Need to check.
from neogit.
lemme know if if you need any pointers ;)
from neogit.
@CKolkey
I think the additional empty line of the file is added by EOF marker ['']
Current implementation of handle_output (https://github.com/NeogitOrg/neogit/blob/master/lua/neogit/process.lua#L285) is not handling channel.
I think if channel provides lines as below
["abc"]
[""] <-- complete line
["def"]
[""] <-- complete line
[""] <-- EOF
then stdout should be
"abc"
"def"
(EOF)
but current implementation maybe makes
"abcdef"
from neogit.
I am trying to modify call_sync to use plenary.job instead of neogit.process.
from neogit.
Related Issues (20)
- Readme missing info about fuzzy finders
- Making the popup windows' names easily legible
- Expanding the "Recent commits" section sometimes doesn't work HOT 8
- Run git command with certain environment variables
- Neogit causes a black loading screen when starting neovim on v0.10 nightly
- ERROR while toggling diff: Blocking on future timed out or was interrupted.
- Renamed file cannot be shown properly HOT 9
- Revert changes to DiffAtFile action HOT 1
- Multitude of keymap issues during user customization HOT 6
- Neogit tab fails to load HOT 12
- Logo for Neogit HOT 14
- Status bufer not focused nor is status updated on new cwd
- Failing to open popups for more than one repositories
- Option to open status with the current file selected
- Status buffer broken during rebase with unmerged paths HOT 4
- Compose commit messages while pre-commit hooks are running HOT 4
- Cannot checkout worktree HOT 2
- `w` opens up worktree instead of jumping a word HOT 4
- Telescope integration not working HOT 4
- Ask the user if to force push a branch
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neogit.