Skip to content

Conversation

@jgdhs27
Copy link
Contributor

@jgdhs27 jgdhs27 commented Sep 27, 2025

Fixes moving to the previous paragraph with selectionBehavior character, as described in #408.

Too see what this does, create a text file with a few parargaphs like

foo

bar

baz

and use goto previous paragraph.

Before:
image

After:
image

This partially resolves #408. There's a similar issue when moving to the next paragraph, although it's far less severe in that case, as it only results in selecting extra whitespace. (Honestly, the precise behavior for moving paragraphs in helix is pretty difficult to understand.)

return Selections.shift(selection, shiftTo, shift, _);
return Selections.shift(selection, shiftTo, shift, _, skipCharacter);
});
} else if (where === "end") {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to fix the issue with "next paragraph", you'd have to find the condition for which to set skipCharacter in the where === "end" branch too. i haven't been able to figure out the right condition.

@jgdhs27 jgdhs27 marked this pull request as ready for review September 27, 2025 16:28
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.

Next/previous paragraph with selectionBehavior "character" keeps character after paragraph boundary

2 participants