RickStrahl / MarkdownMonster

An extensible Markdown Editor, Viewer and Weblog Publisher for Windows
https://markdownmonster.west-wind.com
Other
1.59k stars 235 forks source link

Request: Ability to insert/remove free-standing Bold/Italics without highlighting a word #1140

Closed nonplayer closed 1 month ago

nonplayer commented 1 month ago

Hello again! When I hit Ctrl-B and Ctrl-I in a blank space (i.e. without highlighting a word), I normally expect them to add a double or single pair of asterisks, respectively, and leave my cursor in the center. Ideally, pressing the same key a second time would then remove the asterisks it just added. I am surprised to see that neither of these events happen here, as this is a pretty standard feature today.

Looking through prior issues, if I'm reading correctly this was removed in #1096 possibly? I can accept that there may be a philosophical difference of design goals in play here, but this seems like such a basic and universal feature to Markdown tools, and I'm perplexed by its absence.

If this functionality could be restored, if not improved, that would be really useful for me. It's a core part of my work flow, established through years of working that way with other tools. I would really like to whittle more of the other apps out of my toolbox, but this one is unfortunately a blocker to full conversion.

Thanks for consideration!

RickStrahl commented 1 month ago

Hmmm... I tend to agree.

The behavior should be:

I think this was a regression for some other scenario. I'll take a look...

RickStrahl commented 1 month ago

Fixed:

EmptyTagMarkup

Yup a regresssion to a helper function (WrapText()) that by default ignores empty text. Added explicit override to the method to allow empty values to expand. The logic to move the cursor into the empty tag was still there :smile:

Updated in preview release 3.5.0.12 and later

nonplayer commented 1 month ago

Fantastic, thank you!