Comments (9)
I figured it out, it was my ~/.lesskeyrc
-- I have -J
or --status-column
enabled which reduces the width by one character. I wonder if it would be possible to detect it, or have a way to override.
from delta.
Hm, this was supposed to have been fixed in v0.0.13 by #22. Let's get to the bottom of this!
I'm not managing to reproduce yet in MacOS iTerm2 with delta 0.0.14. Here's a little experiment. Notice how, in the first case, delta is leaving one character of space unused at the right edge of the terminal. This is what is should always do by default, since #22. In the second case, less
is invoked with -J
, and so it inserts an extra space in the left column, but the lines do not overflow on the right because of the extra space which was left there for this reason.
Can you reproduce this? (If not, can you double check the version of delta
that is being invoked by git (maybe pipe git
output into a delta executable explicitly) and post the relevant contents of your ~.lesskey
).
With LESS
environment variable equal to empty string (export LESS=
):
from delta.
Also, if it's still mysterious, could you post the values of the environment variables PAGER
, BAT_PAGER
and LESS
?
from delta.
Notice how, in the first case, delta is leaving one character of space unused at the right edge of the terminal. This is what is should always do by default, since #22. In the second case, less is invoked with -J, and so it inserts an extra space in the left column, but the lines do not overflow on the right because of the extra space which was left there for this reason.
Well, in my case less -J
adds two spaces:
$ less --version
less 531 (PCRE regular expressions)
Copyright (C) 1984-2017 Mark Nudelman
I've built git-delta
from the sources attached to the release: https://github.com/dandavison/delta/archive/0.0.14.tar.gz
$ delta --version
delta 0.0.14
My .lesskeyrc
: LESS=-imJMWR
My environment:
$ env | grep -i -e '\(less\|pager\)'
LESS=-R -M --shift 5
LESSCOLOR=yes
LESSOPEN=|/usr/bin/lesspipe.sh %s
MANPAGER=manpager
PAGER=/usr/bin/less
I've unset all of my environment and removed the lesskey
file, and tried the pipe mode:
$ env | grep -i -e '\(less\|pager\)'
MANPAGER=manpager
PAGER=/usr/bin/less
$ git show --color=always | delta
And with LESS=-J
:
$ git show --color=always | LESS=-J delta
I've also tried the the latest commit, which gives me the same behaviour:
$ git describe --tags
0.0.14-1-gba454ba
This is inside tmux
.
from delta.
I did a bit of digging, it appears to have changed in version 525 of less
:
gwsw/less@0a150b3#diff-94003069247e17a040faa638addca45cR166
from delta.
Thanks! Should be fixed in master by #43, would you be able to confirm?
from delta.
This is exactly the path I was using as a workaround ;-)
I've built and tested the latest master -- looking good, thank you very much for fixing it promptly.
$ git describe --tags
0.0.14-5-g4b7bbdd
from delta.
I noticed the same (without using any arguments to less
), but the effect appears to depend on the theme. I remember that the output was fine with --dark
, but broken in this way with --light
. I am currently on a different monitor (different resolution) and cannot reproduce it here, though.
from delta.
@fdcds thanks! Do please let us know if you see this problem with the current version.
from delta.
Related Issues (20)
- Navigate keybinds only go between hunks, not files
- update intsructions for tmux color issues
- 🐛 Online user manual website not working HOT 4
- 🐛 When piping --help, the output should not contain escape chars
- 🐛 `--color-only` doesn't produce any colour HOT 2
- 🚀 diff chinese words better HOT 2
- 🐛 Highlighting of capitalisation changes does not match `diff-so-fancy` when using `delta diff-so-fancy` HOT 1
- 🐛 Emacs lisp incorrect highlighting HOT 1
- 🚀 hjkl key bindings as arrow keys HOT 2
- 🚀 Enable using delta in git when output is piped (`git diff | cat`) HOT 3
- 🚀 use diff-compatible exit statuses that differ between difference-found and error HOT 8
- 🚀 Please add support for cargo-binstall HOT 1
- 🐛 wrong highlight with `rg --json | delta` when tabs are involved HOT 2
- 🚀 `ws-error-highlight` HOT 3
- 🐛 Homebrew cannot install from HEAD HOT 2
- 🐛 delta fails to run (in some cases) when `git` is not installed
- 🐛 White space before 2nd, 3rd `k` shouldn't be in highlighted scope
- 🐛 delta not respecting LESS -F environment variable (--quit-if-one-screen) HOT 2
- 🐛 Syntax highlighting fails when the visible snippet includes a multiline comment HOT 2
- 🐛 error: unexpected argument '--generate-completion' found
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 delta.