-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Extra line break visible after indent when settings wrap
, linebreak
and breakindent
are enabled
#13228
Comments
Well, the linebreak setting tells Vim to break at the white space. And there is no whitespace once the |
I'm sorry if I didn't describe the problem well. I understand that a long The problem is that a virtual line break appears between a sequence of whitespaces characters and text, even if it won't give any extra space to the text due to Consider this example, where I've set Cursor is positioned at the last whitespace that precede the long text. The long text begins one column to the right and one row down (which is just one character to the right). It could simply start in the same row. Wrapping in this case is unnecessary. |
I understand what you are pointing out, but you are seeing correct behaviour. In short what In your case, the rest of following letters does not fit into the rest of the screen line, so it needs to wrap at the space right now. And that's what Vim does. So if you don't want that behaviour, then do not set the |
Problem: linebreak applies for leading whitespace Solution: only apply linebreak, once we have found non-breakat chars in the line closes: vim/vim#13228 closes: vim/vim#13243 vim/vim@dd75fcf Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: linebreak applies for leading whitespace Solution: only apply linebreak, once we have found non-breakat chars in the line closes: vim/vim#13228 closes: vim/vim#13243 vim/vim@dd75fcf Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: linebreak applies for leading whitespace Solution: only apply linebreak, once we have found non-breakat chars in the line closes: vim/vim#13228 closes: vim/vim#13243 vim/vim@dd75fcf Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: linebreak applies for leading whitespace Solution: only apply linebreak, once we have found non-breakat chars in the line closes: vim/vim#13228 closes: vim/vim#13243 vim/vim@dd75fcf Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: linebreak applies for leading whitespace Solution: only apply linebreak, once we have found non-breakat chars in the line closes: vim/vim#13228 closes: vim/vim#13243 vim/vim@dd75fcf Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: linebreak applies for leading whitespace Solution: only apply linebreak, once we have found non-breakat chars in the line closes: vim/vim#13228 closes: vim/vim#13243 vim/vim@dd75fcf Co-authored-by: Christian Brabandt <cb@256bit.org>
Steps to reproduce
It looks like this (screenshot comes from neovim, but behavior is the same):
As you can see text starts in the second line, but it might as well start in the first one.
Expected behaviour
There should be no line break between whitespaces and the text and it should look just like linebreak is disabled in this case.
It should look like this:
Version of Vim
9.0
Environment
Operating system: Windows 10
Terminal: cmder 1.3.21
Shell: cmd, powershell
Logs and stack traces
The text was updated successfully, but these errors were encountered: