Skip to content

fix: indent an item's content when entering a new line from normal mode #950

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

Merged
merged 2 commits into from
Apr 28, 2025

Conversation

thuyen
Copy link
Contributor

@thuyen thuyen commented Mar 28, 2025

Summary

At the end of a listitem, if we hit Enter in insert mode, the cursor will be indented in the following line; if we hit o to enter the new line from normal mode, the cursor will not be indented. The added test is failing on master. This PR fixes that.

Closes #940

Changes

Checklist

I confirm that I have:

  • Followed the
    Conventional Commits
    specification
    (e.g., feat: add new feature, fix: correct bug,
    docs: update documentation).
  • My PR title also follows the conventional commits specification.
  • Updated relevant documentation, if necessary.
  • Thoroughly tested my changes.
  • Added tests (if applicable) and verified existing tests pass with
    make test.
  • Checked for breaking changes and documented them, if any.

@thuyen thuyen marked this pull request as draft March 28, 2025 00:46
@thuyen thuyen changed the title fix: indent item content when entering new line in normal mode fix: indent item content when entering new line from normal mode Mar 28, 2025
@thuyen thuyen changed the title fix: indent item content when entering new line from normal mode fix: indent an item's content when entering new line from normal mode Mar 28, 2025
@thuyen thuyen changed the title fix: indent an item's content when entering new line from normal mode fix: indent an item's content when entering a new line from normal mode Mar 28, 2025
@thuyen thuyen force-pushed the indent_in_normal_mode branch 3 times, most recently from 6b5010e to acee505 Compare March 29, 2025 23:05
@thuyen thuyen marked this pull request as ready for review March 29, 2025 23:06
@kristijanhusak kristijanhusak force-pushed the indent_in_normal_mode branch from acee505 to 35a961d Compare April 28, 2025 20:24
Copy link
Member

@kristijanhusak kristijanhusak left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@kristijanhusak kristijanhusak merged commit 15d66ea into nvim-orgmode:master Apr 28, 2025
38 of 39 checks passed
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.

Inconsistent indentations for list item contents in insert and normal mode
2 participants