Closed ghost closed 1 year ago
That would indeed make more sense. A patch to fix this would be welcome, or I'll have a look at it myself later.
thanks. I'd like to give it a try myself, will report back.
the bug was introduced in f55312ba
.
I found that it also appears when using } if you are at EOL.
Reverting the commit fixes the issue completely (with the exception of } when cursor is on the virtual EOL), and doesn't seem to have side-effects.
The rationale for the commit was "ignoring blank lines". I'm not sure what it means: I tried on a test file with several blank lines in a row and the behavior is the same with the commit applied or reverted.
I tried on a test file with several blank lines in a row and the behavior is the same with the commit applied or reverted.
What happens when you have a line that only has spaces, tabs or a combination of both between the paragraphs?
@casr
In a situation like this:
First
<some whitespace>
Second
with the patch reverted:
if the cursor is on S
, {
moves at the start of line 4, then the start of line 2. IMHO this is correct (it's also how it works in vim).
Rather than reverting the whole commit for f55312ba, I have tested a partial revert in bde0a89. My intent with this change is that I think it maintains the point of the original commit while also trying to address this issue.
Edit: I have rebased my fork on the 0.8 tag. Had to force push, so the new commit sha is 16acbd.
Given the text:
if cursor is on
n
ofanother
, using{
will bring me to the blank line between the two paragraphs, as expected. But if the cursor is onA
ofanother
, I'm brought toFirst
: I'd expect to be brought at the blank line (this is the behavior in vim, and makes more sense/is more useful).