WARNING terminal is not fully functional, but sometimes it is?
Describe the bug Here is a picture of the issue.
As you can see, the subwindow is showing the error message
WARNING: terminal is not fully functional
However, if I press ENTER on the file in my FILES view, I am able to view and interact with my changes as expected.
To Reproduce
- Open up LazyGit
- Press enter on a file to change the view of the second window
- See that it is working
- Press escape and leave that view to see it being broken again.
Expected behavior It shows the correct window
Version info:
commit=, build date=, build source=nix, version=0.42.0, os=linux, arch=amd64, git version=2.45.1
git version 2.45.1
I have the same issue. I'm using lazygit in my neovim inside the tmux (zsh, macOS Sonoma 14.5). Was trying to handle this by changing my .zshrc:
if [ -n "$TMUX" ]; then
export TERM="tmux-256color"
else
export TERM="xterm-256color"
fi
and my .tmux.conf:
set -g default-terminal "tmux-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
and explicitly set there the colors (as a GPT-proposal), but end up with no results.
Having the same issue :( Any progress ?
No progress on my end. The terminal I'm using is alacritty
> echo $TERM
alacritty
I tried temporarily overriding the TERM variable with the following terminal names and that didn't change behaviour either. Used, xterm, xterm-256color and tmux-256color 😭
any updates?
I haven't had a chance to test anything more on my end unfortunately :(
On Friday, July 12th, 2024 at 2:15 AM, Egor M @.***> wrote:
any updates?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Same with 0.43.1 here
Run into this on xterm-kitty.
@zamlz
In my case, it was due to lazygit configuration located at Library/Application\ Support/lazygit/config.yml(location differ on other OS).
gui:
showIcons: true # DEPRECATED
git:
paging:
useConfig: true
I just delete all configuration, and problem is solved.
In my case, I delete "useConfig" option located at Library/Application\ Support/lazygit/config.yml(location differ on other OS).
before:
gui:
showIcons: true # DEPRECATED
git:
paging:
pager: delta --dark --paging=never
useConfig: true
after:
gui:
showIcons: true # DEPRECATED
git:
paging:
pager: delta --dark --paging=never
I just delete useConfig:true, and it worked.
For me it was the pager: "less" config option I had that was creating the error.
Leaving pager empty with pager: "" fixes the problem.
In my case, I delete "useConfig" option located at Library/Application\ Support/lazygit/config.yml(location differ on other OS).
before:
gui: showIcons: true # DEPRECATED git: paging: pager: delta --dark --paging=never useConfig: trueafter:
gui: showIcons: true # DEPRECATED git: paging: pager: delta --dark --paging=neverI just delete useConfig:true, and it worked.
Same for me.
Oh wow, y'all are right. I had the useConfig: true set on mine and I removed it and everything is working again. I wonder why I set that in the first place though?
Okay I must have removed whatever pager I had set in .gitconfig
The documentation here actually is key.
https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md#using-git-config
I did not realize it would still try to use less even if nothing was set on the .gitconfig side.
in my case
before:
gui:
showIcons: true
git:
paging:
colorArg: always
pager: delta --dark --paging=always --commit-style box
after:
gui:
showIcons: true
git:
paging:
colorArg: always
pager: delta --dark --paging=never --commit-style box
I ran into this today and went looking, and I think I've found the cause: the current logic for useConfig: true seems to be as follows:
- Try to get the value of
$GIT_PAGER, if empty try$PAGER, if empty try the value ofcore.pagerset in git config - For the value resolved in 1, take everything to the left of '| less' if present, else all of it
- Use the value resolved in 3 as the pager
Now, for most folks $PAGER is likely to be set to less (try it: run echo $PAGER in your terminal). This thus leads to an attempt to use less as the pager, which is known to not work well with lazygit:
... because less doesn't play nice with our rendering approach.
@jesseduffield What was the reason for using $PAGER? I tried looking at the relevant PR but couldn't find any comment about it. In my understanding this is variable is not related to git directly and is quite likely to be set to less. If there is no specific reason, can we skip looking at the value of $PAGER and instead directly go from $GIT_PAGER to git config?
(Hey @zamlz, would you mind re-opening this issue, so that the discussion here can continue until this is resolved in some way?)
@aksh1618 This all makes sense; I wasn't around yet when the pager PR was done, so I can only guess, but I speculate that the only reason for including $PAGER is that git does that too. Like with $GIT_EDITOR and $EDITOR.
Your proposed fix of skipping $PAGER makes sense to me.
However, I will also say that I don't see a lot of value in the useConfig: true setting in the first place, where we need to tweak the config into one that works for us (by stripping | less, but what if they use a different pager like Moar, or pass options to less, or don't have a space between | and less, etc. etc.?).
I wouldn't mind if we got rid of the useConfig option, and let users specify exactly what they want to use in lazygit. This would get rid of this whole class of problems.
I can't decide this though, so I hope @jesseduffield sees this (he's pretty busy these days). Reopening for now.
Sorry, I thought the issue was resolved because the documentation I linked clearly explained the issue. I guess the follow-up is that is how the pager is resolved and if this logic should be updated at all. Thanks @stefanhaller for opening it again.
Thanks for the detailed reply @stefanhaller!
For me the value proposition of useConfig is that lazygit automatically updates whenever I modify the pager used in git, which is admittedly not a mjor one as it's a pretty rare thing to do.
However, I agree with you that this could potentially turn into a never ending rabbit hole of edge cases as we're entering command parsing territory here! So removing the useConfig option seems like the way to go to me as well, in its current form at least.
(No worries @zamlz, you reserve the right to close as the author as you deem fit!)
In my case, I delete "useConfig" option located at Library/Application\ Support/lazygit/config.yml(location differ on other OS).
before:
gui: showIcons: true # DEPRECATED git: paging: pager: delta --dark --paging=never useConfig: trueafter:
gui: showIcons: true # DEPRECATED git: paging: pager: delta --dark --paging=neverI just delete useConfig:true, and it worked.
That's it!! Thanks a lot
Same problem without custom config:
Lazygit version:
commit=91cb1ff29a01fdf643ccc38b97fd816b2a097bec, build date=2025-01-11T04:06:07Z, build source=binaryRelease, version=0.45.0, os=darwin, arch=arm64, git version=2.39.5 (Apple Git-154)
If you got here trying to get the built-in diff-highlight to work, just ensure its dir is in your $PATH and then do:
git:
paging:
colorArg: always
pager: diff-highlight
For some reason useConfig: true breaks in some cases as mentioned above.
This issue also happens to me. Removing the useConfig: true helped.
Removing pager.useConfig: true worked for me too.
I want to point out the docs currently claim useConfig has no effect when using externalDiffCommand, which is not the case!
The
colorArg,pager, anduseConfigoptions are not used [when using external diff commands].
See https://github.com/jesseduffield/lazygit/blob/v0.54.1/docs/Custom_Pagers.md?plain=1#L80
I think fixing the code to match the docs would already make this less of an issue since useConfig would not interfere for externalDiffCommand users.
I want to point out the docs currently claim
useConfighas no effect when usingexternalDiffCommand, which is not the case!
@ThinkChaos This is fixed by #4837, which removes the useConfig option.