Skip to content
This repository has been archived by the owner on Feb 19, 2023. It is now read-only.

Virtual text is shown after the current line even if zettel is linked on the line above #21

Open
VVKot opened this issue Mar 27, 2021 · 1 comment

Comments

@VVKot
Copy link
Contributor

VVKot commented Mar 27, 2021

This one is a bit tricky to describe. To start off - this only happens while adding new text to a zettel. If I save it and then delete and reopen the buffer with a zettel - the problem goes away.

Repro:

Start with a text of zettel like so:

Lorem ipsum

Press gzZ and add a link to another zettel:

Lorem ipsum [[hash]]

Virtual text is correctly displayed on the current line:

Lorem ipsum [[hash]] *Virtual text with title of "hash" zettel*

However, if you then type in more text, so that you go over to the new line, virtual text will be displayed on the line you started on AND on the current line:

Lorem ipsum [[hash]] *Virtual text with title of "hash" zettel*
one two three *Virtual text with title of "hash" zettel*

If you add more text, second virtual text will follow the current line:

Lorem ipsum [[hash]] *Virtual text with title of "hash" zettel*
one two three
four five six
seven eight nine *Virtual text with title of "hash" zettel*

After that, there is no way to get rid of the second (incorrect) virtual text - only to :bd the buffer and reopen it. E.g. doing :e does nothing - second virtual text stays in place.

@oberblastmeister
Copy link
Owner

this issue has happened to me. The issue is that the virtual text sometimes will not be in sync because we only update virtual text for the lines that we changed, not the entire file to help performance. I am very busy now because of the async await and job prs for plenary so I am not sure if I will have the time to work on this at the moment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants