obsidian-latex-suite
obsidian-latex-suite copied to clipboard
[BUG] Mouse selection highlights wrong text
Write the following inline equation in Obsidian (this is just an example):
$\epsilon_{i} = \zeta_{+}U_{i}^{+} + \zeta_{-}U_{i}^{-}$
Now try to select this equation, by clicking on the right end (just before the ending $
) and dragging the mouse (with the click held) to the left, until the beginning (just after the first $
). Do not include the $
's in the selection. Then, you will see the following gets highlighted as the selection:
which is wrong of course because we wanted to select the full equation, not just this portion. Apparently the concealment confuses the selection highlight logic. In fact, in reality the full equation is selected, as you can check by doing Ctrl+C and Ctrl+V somewhere, the full equation gets pasted.
So the bug is only visual, the selected "highlighted" text does not correspond to the actual selected text. I think it's related to how concealment expands those greek letters when selected.
The issue only occurs when selecting right-to-left. If I had clicked initially on the left of the equation, and dragged right, the selection highlighted area I get is correct.