alanwalk / markdown-toc

MarkdownTOC(Table Of Contents) Plugin for Visual Studio Code.
MIT License
141 stars 111 forks source link

Invisible Table of Contents line making document jump #77

Open robertmarkbram opened 5 years ago

robertmarkbram commented 5 years ago

I am using the magnificent TOC in markdown, but am experiencing this problem with it: the line you see in the screenshot is Table of Contents (up to date) or out of date

VS Code TOC

That lines seems to disappear and re-appear, but much worse is that whenever I press save, undo or redo, it makes the whole document jump up a line.. such that if I am working at the bottom of the document (with the TOC not visible), the current line I am editing keeps jumping up (as though someone was pressing control+down) until it is at the top of the screen.

And much much worse is that it seems to be interfering with the undo+redo chain.. I notice that sometimes I have to press undo multiple times before it starts to undo text I just typed.. and that often redo will do nothing at all even directly after pressing undo a few times.

I know that this issue is related to the TOC, because once I delete the TOC, all of these issues stop.

Any ideas?

robertmarkbram commented 5 years ago

As per this stackoverflow post it seems to be combination of yzhang.markdown-all-in-one and AlanWalk.markdown-toc

robertmarkbram commented 5 years ago

And I can prevent this negative side-affect in AlanWalk.markdown-toc by un-ticking "Auto update on save".