Repository navigation
fix(fast_wrap): Handle pattern matches at end of line - #552
Open
nlipiarski wants to merge 1 commit into
Open
nlipiarski wants to merge 1 commit into
nlipiarski wants to merge 1 commit into
Conversation
nlipiarski
force-pushed
the
fix_fastwrap_lineends
branch
3 times, most recently
from
September 11, 2026 20:28
0fa3c5f to
ac0185d
Compare
nlipiarski
force-pushed
the
fix_fastwrap_lineends
branch
from
September 11, 2026 20:42
ac0185d to
c6e9988
Compare
nlipiarski
marked this pull request as ready for review
September 11, 2026 20:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #408
When using fastwrap with manual_position enabled, if the last character of a line matched the patterned you are not given the option to select where to insert the closing character. Too see why this is an issue, consider the following example:
with
|representing the cursor. Activating fastwrap in this scenario will automatically place the closing]after the)and the user cannot supply a different location. As has been discussed, this is a regression caused by #475. To resolve the problem, I updated the position logic to always include an end character option that represents "end of the line" and to have a normal marker for matches that are the last character in the line. This is similar to what was proposed in #408.Test plan
I performed some pretty extensive manual testing with
manual_positionon and off and similarly withavoid_move_to_endon and off. If there are any specific cases we'd like tested please let me know.