Skip to content

fix: next checkbox bullet type#91

Merged
dkarter merged 1 commit intobullets-vim:masterfrom
samgriesemer:fix-chk-bullet
Mar 5, 2021
Merged

fix: next checkbox bullet type#91
dkarter merged 1 commit intobullets-vim:masterfrom
samgriesemer:fix-chk-bullet

Conversation

@samgriesemer
Copy link
Copy Markdown
Contributor

what: This pull request allows for automatic insertion of checkbox bullet types - [ ] and * [ ].

why: From what I can tell, bullets.vim will match either - [ ] or * [ ] syntax as checkbox bullets (seen in the match_checkbox_bullet_item() function). However, when it comes to automatically inserting a new bullet in a list of checkboxes, the next_chk_bullet() function only inserts new checkboxes with - [ ] syntax, regardless of the style matched in the list.

how: The proposed change is a one line fix, inserting the first character of the matched checkbox bullet found in match_checkbox_bullet_item() as the first character of the next bullet. This enables either of the matched syntax styles to be automatically extended (which seems like the expected behavior).

testing: I've had this change made in my local vim setup for the last few days, and things seem to be working as expected. This is by no means comprehensive testing, but the nature of the fix leads me to believe the scope of possible consequences in quite small to begin with. Please let me know if there any issues or standards I've overlooked here.

@dkarter
Copy link
Copy Markdown
Member

dkarter commented Mar 5, 2021

Thank you for the PR! LGTM! ✨

@dkarter dkarter merged commit c2bc8ed into bullets-vim:master Mar 5, 2021
@dkarter
Copy link
Copy Markdown
Member

dkarter commented Mar 5, 2021

@all-contributors please add @samgriesemer for code and bug

@allcontributors
Copy link
Copy Markdown
Contributor

@dkarter

I've put up a pull request to add @samgriesemer! 🎉

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.

2 participants