Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support delta along with ANSI support (continuation) #1298

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

pablospe
Copy link

The original pull request was closed due to the author deleting their account.

Original PR description

#542 (comment)

  • All test passes.
  • I haven't seen segmentation faults with newest versions of MacOS Big Sur, iTerm2, and delta. ncurses version is 6.2.
  • It looks like no performance issues.
  • I've only tested it with Terminal.app and iTerm on MacOS.

image

image

how to use delta in tig?

It requires ncurse 6.1 or higher.

# if you don't have ncurses
curl -O ftp://ftp.gnu.org/gnu/ncurses/ncurses-6.2.tar.gz
tar -xzvf ncurses-6.2.tar.gz
cd ncurses-6.2
./configure --prefix=${where you like} --enable-pc-files --with-pkg-config-libdir=/usr/local/bin/pkgconfig --enable-sigwinch --enable-symlinks --enable-widec --with-shared --with-gpm=no --without-ada --enable-ext-colors # i set the path as /usr/local which is default
sudo make
sudo make install

cd ${path to tig of the branch of above PR}
make configure
./configure LDFLAGS=-L${where you download ncurses}/lib CPPFLAGS=-I{where you installed ncurses}/include  # i set the path as /usr/local/opt/ncurses which is installed by ncurses
make

echo "set diff-highlight = \"delta\"" >> ~/.tigrc

./src/tig

Note: a more detailed installation instructions can be found in this comment from @adamency.

@rmacklin
Copy link

rmacklin commented Aug 5, 2024

Note for anyone landing on this PR that might want to try building and running it locally - this PR does not integrate delta's git blame support into tig blame. If you only want delta's git diff support in tig, this may work for you, but tig blame will still lack syntax highlighting.

@JelteF
Copy link
Contributor

JelteF commented Nov 4, 2024

Something is not really working correctly with this PR. It's still showing the regular diff view combined with the delta function header in many cases. This happens when I browse the branch of this PR with tig compiled from this branch.
image

To be clear, it doesn't always happen. Sometimes it will show the syntax highlighted diff of delta. But when scrolling through the commits with up and down arrows, most will show the old style diffs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants