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

Org meta return in checkboxes clears checkbox values #824

Open
blademaw opened this issue Nov 9, 2024 · 0 comments
Open

Org meta return in checkboxes clears checkbox values #824

blademaw opened this issue Nov 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@blademaw
Copy link

blademaw commented Nov 9, 2024

Describe the bug

Using the context-aware meta return functionality (<leader><CR>) clears the values ([-], [X]) of previous checkboxes in the same hierarchy.

Steps to reproduce

Create a headline and checkbox; e.g.:

* headline
  - [X] checkbox 1

and execute the meta-return:

* headline
  - [ ] checkbox 1
  - [ ] 

Curiously, this seems to not affect some checkbox states:

* headline
  - [X] checkbox 1
  - [ ] checkbox 2
  - [X] checkbox 3

and pressing <leader><CR>:

* headline
  - [ ] checkbox 1
  - [ ] checkbox 2
  - [X] checkbox 3
  - [ ] 

Expected behavior

Ideally the meta return would create a new (blank) checkbox and leave the previous values unaffected.

Emacs functionality

No response

Minimal init.lua

return {
	"nvim-orgmode/orgmode",
	event = "VeryLazy",
	ft = { "org" },
	config = function()
		-- Setup orgmode
		require("orgmode").setup({
			org_agenda_files = "~/orgfiles/**/*",
			org_default_notes_file = "~/orgfiles/refile.org",
			mappings = {
				org = {
					org_toggle_checkbox = "<leader>ca",
                                        -- NOTE: this keymap is not the culprit
				},
			},
		})
	end,
}

Screenshots and recordings

No response

OS / Distro

Arch Linux

Neovim version/commit

0.10.2

Additional context

No response

@blademaw blademaw added the bug Something isn't working label Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant