Display bug in b20

scott's Avatar


22 Aug, 2017 03:58 AM

Not sure when this happened (I was away from my main computer for 2 days), but in b20 I'm seeing a display bug for headlines when they're the first line in a document (see attached pic). This is a custom theme, but it was working 100% fine in b16.

The truncation happens (for me) in levels # to ### with "fontScale" : 1.6 to 1.3.

One carriage return and there's no truncation. Also no truncation for standard paragraph etc… so seems to just happen with styles with "fontScale" : 1.2ish and higher.

  1. 1 Posted by scott on 22 Aug, 2017 04:37 AM

    scott's Avatar

    After doing some more work tonight, I've noticed that the caret is off center with headlines. Same goes for highlighting headlines. Couple screenshots attached.

  2. 2 Posted by scott on 22 Aug, 2017 04:45 AM

    scott's Avatar

    Okay here's an odd one. Basically I just increased font size in Prefs → Appearance and the redraw did what you see in the screenshot. So you know what the style colors in the screenshot are supposed to be:

    and * = gray

    text = purple

    List items = beige

    Had to quit/restart to get proper display back.

  3. 3 Posted by scott on 22 Aug, 2017 04:46 AM

    scott's Avatar

    Wow getting late. Forgot to codeify the markdown:

    ## and * = gray
    ## text = purple
    List items = beige
  4. Support Staff 4 Posted by Fletcher on 22 Aug, 2017 11:32 AM

    Fletcher's Avatar

    I was trying to fix the (standard macOS) behavior whereby superscripting
    or subscripting text causes the line height to get taller, even if there
    is enough space.

    This didn't work as well as I hoped, so I disabled it, at least for now.

    b21 should resolve the issue you see.



  5. Support Staff 5 Posted by Fletcher on 22 Aug, 2017 06:04 PM

    Fletcher's Avatar

    Can you send me the file with the offset list highlighting?

  6. 6 Posted by scott on 23 Aug, 2017 01:16 PM

    scott's Avatar

    I'll see what I can do… I'll try and get you something tonight.

  7. Support Staff 7 Posted by Fletcher on 23 Aug, 2017 01:41 PM

    Fletcher's Avatar

    It looks like something happened that caused Composer to be off by 1 or
    2 in counting, and that is simply propogated throughout the list.

    Perhaps there is something strange right before the trouble (unusual
    invisible character for example?

    Did it persist if you kept typing in the list?

  8. 8 Posted by scott on 23 Aug, 2017 01:59 PM

    scott's Avatar

    Interesting. Yeah it propagated… it was super late so I didn't mess around too much though, aside from seeing what happened if more list items were added. But after restarting MMDC all was well. I'll take a look at invisible chars tonight.

    As an aside, I *have* noticed on some documents (which were created in Bear, which I trialled for awhile, then exported all notes to .md once I realized that app was **not** for me) that there are occasionally some invisible chars that show up in MMDC even though I have "show invisibles" off… I only see this on stuff created outside MMDC in Bear and I delete the offending chars when I come across them. The invisible is always an "L" on its side which I'm pretty sure is carriage return. So maybe Bear throws some odd crap out occasionally during export? I still have it installed on that machine and I could whip up a test doc tonight and export and send that to you for testing if you want… just lemme know.

    The document that I sent the screenshot of was originally created in Bear, but I can't remember if it had any of those "visible invisibles" or not in MMDC.

  9. Support Staff 9 Posted by Fletcher on 23 Aug, 2017 10:15 PM

    Fletcher's Avatar

    People are always surprised that "strange" characters in their documents
    do strange things. ;)

    If you have a file that can recreate the problem, definitely send it to
    me. If it has strange characters but doesn't cause a problem then don't
    worry about it.


  10. 10 Posted by scott on 23 Aug, 2017 11:05 PM

    scott's Avatar

    Right… except this is beta software and as I said I keep "show invisibles" off. So seeing an invisible char randomly show up in a document is an unexpected event and I would tend to attribute it to an issue with the beta software ;)

    Oh and I went back and figured out which document is in that screenshot and it was a document created in MMDC a couple days ago.

    When I notice another invisible character show up I will turn on "show invisibles" and see if there's anything odd or if it disappears when I hide invisibles.

  11. Support Staff 11 Posted by Fletcher on 24 Aug, 2017 12:07 AM

    Fletcher's Avatar

    "Show invisibles" only shows space, tab, and newlines. It doesn't show
    every possible control character, so it won't change what you see in
    this instance.


  12. 12 Posted by scott on 24 Aug, 2017 12:12 AM

    scott's Avatar

    Interesting. Well when the rogue invisible shows up it's always a single newline. Not a bunch of newlines. Not all of them… just one.

  13. Support Staff 13 Posted by Fletcher on 24 Aug, 2017 12:13 AM

    Fletcher's Avatar

    You do know that "space-space-newline" is a hard linebreak, and will be
    marked as a newline by Composer, right?

  14. 14 Posted by scott on 24 Aug, 2017 12:45 AM

    scott's Avatar

    Oh that's funny. Yeah I mosdef know about space-space-return, however, I almost never use it generally and I've never used it in MMDC.

    Anyway, I did a "space-space-newline" test in MMDC just now and this is exactly what I'm seeing. I must occasionally do it on iOS where I can be lazy about deleting extra spaces at the end of list items.

    Well that mystery has now been solved. But this also means that the display issue in reply 2 is a real issue. However, I'm sure it's some sort of edge case since I haven't been able to reproduce it.

  15. Support Staff 15 Posted by Fletcher on 26 Aug, 2017 10:39 PM

    Fletcher's Avatar

    It's possible for the highlighting to be applied in an incorrect state under rare circumstances. The easiest way to reset is to cut all and then paste it back in. That reapplies highlighting to the entire document.

    The alternative is to reparse the entire document with every keystroke, which is not sustainable as the document gets longer.

    If you find a way to consistently confuse the parser, let me know so I can improve it.

  16. Fletcher closed this discussion on 26 Aug, 2017 10:39 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac