Previously, if you set the exact same latex as what was currently set, the cursor would not be moved to the end, but in all other cases, it would be. I think this is confusing and could allow bugs in that special case that don't exist in other cases.
Now, pull out logic for moving the cursor and for checking whether the latex is exactly the same into the renderLatexMath method to clarify that it should be the same whether we run renderLatexMathEfficiently or renderLatexMathFromScratch.
Also rename renderLatexMathEfficiently to updateLatexMathEfficiently.
Note: I have verified that this benchmark does not significantly impact benchmark/update.html
Previously, if you set the exact same latex as what was currently set, the cursor would not be moved to the end, but in all other cases, it would be. I think this is confusing and could allow bugs in that special case that don't exist in other cases.
Now, pull out logic for moving the cursor and for checking whether the latex is exactly the same into the
renderLatexMath
method to clarify that it should be the same whether we runrenderLatexMathEfficiently
orrenderLatexMathFromScratch
.Also rename
renderLatexMathEfficiently
toupdateLatexMathEfficiently
.Note: I have verified that this benchmark does not significantly impact
benchmark/update.html