Bug when typing accent char ` and then click somewhere

I found a critical bug in FoldingText that occurs when you enter an accent for trying source code in Markdown: ` and then clicking somewhere in the text or in my case I had the text and wanted to add the ` around it.
Typing it at the beginning is no problem by when you are NOT hitting space after it and click right at the end of the text (like I did) the whole text in-between gets removed.
In other editors this works without any problems - please fix.
(I am using latest version from Mac App Store on OS X 10.11.1)


thanks for reporting this, but I’m not sure I can reproduce the scenario you’re talking about. Would it be possible for you to send me a video of the problem in action?

For code, we use this character `, which doesn’t cause problems. However, I just noticed something else while testing (which I’m not sure we can fix), is typing Alt-e ´ to start the composition mode of OS X for entering accents on top of characters, and then clicking on text ‘earlier’ than the accent character without actually completing it. This removes all text between the click area and the accent start.

With the source code markers, I’m afraid I’m unable to reproduce.



Hi Mutahhir,
thanks for your answer.
I took two videos and uploaded them to my Dropbox.
I used the source code marker in video #1 and the other one in video #2. Both times
the error occurred as you can see in the videos.
I removed all plugins from FoldingText before testing and creating these videos.

Here are the links:
Video #1: https://www.dropbox.com/s/to6q3jkqcxtbfor/FoldingText%20Bug%20%231.mov?dl=0
Video #2: https://www.dropbox.com/s/uifes459uwmahjx/FoldingText%20Bug%20%232.mov?dl=0

Best regards,

Hi Joerg,

Thanks for the videos. Those really helped!

The character for starting source code in markdown is ` and although it can be used like an accent ( I can do that by typing in Alt-` on my keyboard), the way FoldingText accepts it is on its own. What’s happening right now within your video is that you’re starting what’s called a ‘composition mode’ to compose unicode characters like é À etc, and currently FoldingText doesn’t handle the case of ‘clicking somewhere else after starting composition mode’.

I can’t let you know what character it is on your keyboard as mine is the US Layout, but for me not pressing Alt with ` usually lets me work with source code without this bug.

I hope I made this clear. Do let me know if you still have questions.

(Also, as a test, see if you can get source code markers to work with this form’s input, it also accepts Markdown)