Closed tjtrabue closed 6 months ago
+1
:facepalm:
The end point of the region passed to edit-indirect-after-commit-functions
is incorrect, so markdown--edit-indirect-after-commit-function
thinks the code block ends in the middle of a line and so it adds the trailing line feed.
I have no idea how I've never noticed this bug, nor how I've made this silly mistake in the first place, especially since there's an end marker right there, in the very same function edit-indirect--commit
, just a handful of lines above the hook invocation, and the invocation of edit-indirect-before-commit-functions
is correct!
Greetings,
I love this plugin! It works so well with
markdown-mode
, allowing me to edit code blocks as if I was programming inorg-mode
. It's wonderful! I just noticed some strange behavior today. If I edit a Markdown file, and I place my cursor anywhere other than the beginning of a code block, and then proceed to edit the code block withmarkdown-edit-code-block
(which usesedit-indirect
to pop up the temporary code buffer) and close the buffer withedit-indirect-commit
, a newline gets inserted where at the position of my cursor. It may have to do with the fact that I useevil-mode
.To recap the steps I used to produce this bug:
markdown-mode
,edit-indirect
,evil-mode
markdown-mode
is active,evil-mode
is active, and thatedit-indirect
has been loaded...
" in any programming languageC-c '
to edit the code block in an indirect bufferC-c '
again to runedit-indirect-commit
Do you have any ideas as to why this may be happening? I would appreciate any help you could give me.
Thank you so much! -tjtrabue