Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for inserting new bullets mid-line #158

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cdalizadeh
Copy link

The previous behaviour is that calls to insert_new_bullet() while the cursor is in the middle of the line (in insert mode) do not insert a bullet in the newly created line. This behaviour differs from most word processors, which insert a new bullet when enter is pressed mid-line. This PR modifies insert_new_bullet() to a insert a bullet in the newly created line when called from the middle of the line in insert mode.

Previous behaviour:

# Before
* First sentence. Second sentence.

# After (enter is pressed just before 'S' in insert mode)
* First sentence. 
Second sentence.

New behaviour:

# Before
* First sentence. Second sentence.

# After (enter is pressed just before 'S' in insert mode)
* First sentence. 
* Second sentence.

@@ -28,7 +28,6 @@
end

it 'supports nested dot bullets' do
pending('FIXME: this test fails, but the functionality works')
Copy link
Author

Choose a reason for hiding this comment

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

This line was causing tests to fail. Happy to add it back if needed.

@cdalizadeh cdalizadeh force-pushed the cdalizadeh/mid-line-new-bullets branch from e296418 to 167140b Compare February 23, 2025 12:06
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