Skip to content

Backspace only removes one formatting character from an empty formatting snippet #468

Description

@uNyanda
  • Date: 2026-07-24
  • Type: Bug
  • Severity: Minor

Environment

  • OS: Linux
  • WM: Niri
  • Compositor: Wayland
  • Software version: 2.16.0

Description

When a formatting shortcut inserts an empty Markdown formatting snippet, pressing Backspace before entering any text only removes a single formatting character instead of removing the entire snippet.

This affects all formatting shortcuts.

Steps to reproduce

  1. Create or open a note.
  2. Use any formatting shortcut (for example, Ctrl+B for Bold).
  3. Without typing any text, press Backspace.

Expected Behaviour

If no text has been entered, pressing Backspace should remove the entire inserted formatting snippet in a single action.

For example:

  • Bold: **|** -> (removed completely)
  • Italic: *|* -> (removed completely)
  • Strikethrough: ~~|~~ -> (removed completely)
  • Highlight: ==|== -> (removed completely)
  • Inline code: | -> (removed completely)

Actual Behaviour

Only a single formatting character is removed, leaving incomplete Markdown.

Examples:

  • Bold: **|** -> *|**
  • Italic: *|* -> |*
  • Strikethrough: ~~|~~ -> ~|~~
  • Highlight: ==|== -> =|==
  • Inline code: | -> |`

Additional Notes

This issue is reproducible with every formatting shortcut tested, suggesting the behaviour is not specific to a single formatting selection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions