Open wanaiqing opened 1 year ago
80f65d161587f052c7f5d4e8b97877d9c8379ca0 support disable wrapping:
g:GIT_LENS_CONFIG = {
blame_wrap: false,
}
80f65d1 support disable wrapping:
g:GIT_LENS_CONFIG = { blame_wrap: false, }
What's the right syntax for this in .vimrc? It's causing an error.
80f65d1 support disable wrapping:
g:GIT_LENS_CONFIG = { blame_wrap: false, }
What's the right syntax for this in .vimrc? It's causing an error.
I guess your .vimrc is not vim9 script, try this:
vim9cmd g:GIT_LENS_CONFIG = {
blame_wrap: false,
}
80f65d1 support disable wrapping:
g:GIT_LENS_CONFIG = { blame_wrap: false, }
What's the right syntax for this in .vimrc? It's causing an error.
I guess your .vimrc is not vim9 script, try this:
vim9cmd g:GIT_LENS_CONFIG = { blame_wrap: false, }
It works now. But actually my output of :echo has('vim9script') is 1... But thx
There's still a problem of it.
If there is a long line which is so long that it could totally hide the blame line(no letter will appear in screen), the blame line will entirely wrap to next line.
For example([] indicates screen, {} indicates blame line):
[This is a normal text line which is very long. ]
{ Author · Date · Commit Log }
It supposed to be rendered like below.
[This is a normal text line which is very long. { ] Author · Date · Commit Log }
There's still a problem of it. If there is a long line which is so long that it could totally hide the blame line(no letter will appear in screen), the blame line will entirely wrap to next line. For example([] indicates screen, {} indicates blame line):
[This is a normal text line which is very long. ]
{ Author · Date · Commit Log }
It supposed to be rendered like below.[This is a normal text line which is very long. { ] Author · Date · Commit Log }
Can you put you :version
output here?
Cannot reproduce in Vim-9.0.1441
The key to reproduce it is that you have a line which's tail is touching the right border of screen. I don't think it's a version specific issue. But my version is as below.
Try the latest version, I think c27b09f should fix this.
@Eliot00 I have just tried, but another problem appeared...
Say, we have three lines:
[some text... Author · Date · Log ]
[a line that is very long so that it is touching screen ]
[some text... ]
Now you use j/k to move upward or downward and stay at the long line, the blame info of the line before the long line or after the long line won't disappear...
It looks like above or below.
[some text... ]
[a line that is very long so that it is touching screen ]
[some text... Author · Date · Log ]
Fixed, looking forward to your feedback.
Fixed, looking forward to your feedback.
It looks great now, thanks.
Still has a problem.
[this is a long line.........................................]
[............end of it. ]
The blame info won't be rendered...
In fact, this should be an upstream bug. If a line of text just occupies the entire line width, virtual text will wrap. Vim doesn't provide a way to judge this situation, I'm not sure my method can cover all situations
if !GetConfig('blame_wrap') && (winwidth(0) - &numberwidth - 1) == virtcol('$')
return
endif
How to disable auto wrapping? It's annoying if the screen is narrow.