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

Treat consecutive paragraph indicators as different paragraphs #119

Merged
merged 1 commit into from Aug 29, 2023

Conversation

lichray
Copy link
Owner

@lichray lichray commented Aug 28, 2023

Consecutive empty lines count toward the same state, so there're 2x states (to get in and out). ^L and .PP are counted as text, hitting those in the text should be treated as getting out of a paragraph and then getting in.

Closes: #118
See also: https://marc.info/?l=openbsd-bugs&m=169100763926909&w=2

Consecutive empty lines count toward the same state, so there're
2x states (to get in and out). ^L and .PP are counted as text,
hitting those in the text should be treated as getting out of a
paragraph and then getting in.

Closes: #118
See also: https://marc.info/?l=openbsd-bugs&m=169100763926909&w=2
@lichray
Copy link
Owner Author

lichray commented Aug 28, 2023

@leres Can you review this change? Thanks.

@leres
Copy link
Collaborator

leres commented Aug 28, 2023

@leres Can you review this change? Thanks.

I was able to verify the bug and also that this change solves it.

@lichray lichray merged commit 517d821 into main Aug 29, 2023
@lichray lichray deleted the jump-para branch August 29, 2023 08:50
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this pull request Aug 29, 2023
Two github issues identified the same problem:

    lichray/nvi2#118
    lichray/nvi2#119

For example typing "}" three times on this sample text:

.PP
1
.PP
2
.PP
3
.PP
4
.PP
5
.PP
6

moves the cursor 3 paragraphs but typing "3}" (correct)  moves the
cursor 5 paragraphs ((2 * N) - 1, incorrect).

Reported by:    Walter Alejandro Iglesias, Zhihao Yuan
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.

vi(1) moves 2x amount of paragraphs with 'para' options
2 participants