Skip to content

Fix broken multi-line comment highlighting #115

Open
davidklassen wants to merge 1 commit intoantirez:masterfrom
davidklassen:fix-row-index-update
Open

Fix broken multi-line comment highlighting #115
davidklassen wants to merge 1 commit intoantirez:masterfrom
davidklassen:fix-row-index-update

Conversation

@davidklassen
Copy link

Fixes #114

editorDelRow() uses idx++ to update row indices after deletion, but it should be idx--. Rows shift up when deleted (the inverse of insertion), so their indices must decrease. The wrong direction corrupts row.idx, which breaks editorUpdateSyntax() — it uses row->idx + 1 to propagate comment state to the next row, but the inflated index makes the bounds check fail and propagation stops silently.

@davidklassen davidklassen changed the title Fix row index update direction in editorDelRow Fix broken multi-line comment highlighting Mar 2, 2026
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.

Multi-line comment highlighting breaks after row deletion

1 participant