wfxr / forgit

:zzz: A utility tool powered by fzf for using git interactively.
MIT License
4.32k stars 136 forks source link

apperance truncated #268

Closed jeusdi closed 1 year ago

jeusdi commented 1 year ago

Check list

Environment info

Problem / Steps to reproduce

I've recorded an asciinema in order to show the behavior.

  1. diff left pane seems to be truncated.
  2. blame theme is not applied.

Here my ~/.gitconfig:

[core]
    editor = nvim
    pager = delta

[interactive]
    diffFilter = delta --color-only

[delta]
    navigate = true    # use n and N to move between diff sections
    light = false      # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal)
    side-by-side = true

[merge]
    conflictstyle = diff3

[diff]
    colorMoved = default

As you can see, I'm using delta.

Any ideas?

cjappl commented 1 year ago

I’ve noticed this as well when the diff is side by side instead of interleaved.

Can you try disabling side-by-side for delta from your git config and see if it fixes it?

I think one way to make this view better would be messing with the forgit override variables. You could try moving the preview window to below, and it may render better.

Cool asciinema! Never seen that before.

On Mon, Dec 26, 2022 at 12:29 PM, jeusdi @.***> wrote:

Check list

  • I have read through the README
  • I have the latest version of forgit
  • I have searched through the existing issues

Environment info

  • OS

  • Linux

  • Mac OS X

  • Windows

  • Others:

  • Shell

  • bash

  • zsh

  • fish

Problem / Steps to reproduce

I've recorded an asciinema in order to show the behavior.

  • diff left pane seems to be truncated.
  • blame theme is not applied.

Any ideas?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

jeusdi commented 1 year ago

I've tested disabling side-by-side. The preview window content is expanded up to the right of terminal. When I set up side-by-side again, "truncation" behavior arises again.

asciinema here

  1. Why does this problem appear?
  2. Do you think it can be fixed using variables?
burgessa23 commented 1 year ago

I'm seeing the same thing on macOS Ventura

0rtz commented 1 year ago

Related to https://github.com/wfxr/forgit/issues/121

cjappl commented 1 year ago

Can you try the solution here https://github.com/wfxr/forgit/issues/121#issuecomment-968118124

Thanks for that suggestion @0xRZ !!

sandr01d commented 1 year ago

Regarding the theme not being applied with blame:

There are two things at play here:

  1. delta is not able to apply syntax highlighting when receiving it's input from a pipe, see dandavison/delta#1231
  2. Delta does not seem to apply it's theme when --date is used with any value other than iso8601 or iso8601-local. I think this is a bug, as even a simple git blame --date=short FILENAME does not apply it's theme and I've created an issue at dandavison/delta#1278

We currently always use --date=short for the preview, so the preview isn't cluttered too much. I think this is a sane default, but maybe we should allow the user to override this behavior?

carlfriedrich commented 1 year ago

The blame date format can now be configured with #292.

@sandr01d Do I get it right that the rest is an upstream delta issue and not related to forgit?

sandr01d commented 1 year ago

The blame date format can now be configured with #292.

@sandr01d Do I get it right that the rest is an upstream delta issue and not related to forgit?

Regarding the missing color scheme/missing syntax highlighting yes. Regarding the truncated preview I don't know. @jeusdi could you verify whether https://github.com/wfxr/forgit/issues/121#issuecomment-968118124 works for you?

carlfriedrich commented 1 year ago

Pinging @jeusdi to verify if this issue still exists, otherwise I will close it next week.