Skip to content

fix(editor): continue the list when Enter is pressed mid-item - #188

Merged
gnacho merged 1 commit into
masterfrom
fix/186-enter-mid-list
Nov 12, 2026
Merged

gnacho merged 1 commit into
masterfrom
fix/186-enter-mid-list

Conversation

@gnacho

@gnacho gnacho commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Enter on a list item only continued the list when the cursor was at the end of the line. Anywhere else the handler bailed out and the plain newline left the second half of the text outside the list.

The handler now reads the whole line instead of the text up to the cursor, so it can see the marker wherever the cursor is. When the cursor sits inside the indent or the marker itself it still leaves the key alone, since there the user is editing the list syntax rather than its content. The marker and the action are decided by a pure function and the buffer work lives in continuar_lista_en_buffer, so both are testable.

Closes #186.

@gnacho
gnacho merged commit 5f09a5d into master Nov 12, 2026
3 checks passed
@gnacho
gnacho deleted the fix/186-enter-mid-list branch November 12, 2026 18:25
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.

Pressing Enter in the middle of a list item does not continue the list marker

1 participant