Add placeholder blinks setting by SymboLinker · Pull Request #177 · verybadcat/CSharpMath

and others added 2 commits

October 24, 2020 09:17
Sync with verybadcat/master

SymboLinker

@SymboLinker

…hat the RestingNucleus is shown for all placeholders if the caret blinks

@SymboLinker

…rue then don't change the CaretState instead of ignoring the changed state later on

charlesroddie

Charles Roddie added 2 commits

October 24, 2020 17:25
and avoid invoking RedrawRequested when state has not changed

charlesroddie

charlesroddie

charlesroddie

@SymboLinker

…tionHighlighted" and "ShouldDrawCaret"

General notes:
Having a CaretState that says "MathKeyboardCaretState.Shown" while actually no caret is shown because a placeholder is shown is wrong. Having a CaretState "MathKeyboardCaretState.Hidden" and "MathKeyboardCaretState.TemporarilyHidden" is not needed: you can use StopBlinking() just after setting the CaretState you want to keep until the next key press. These two observations resulted in the boolean properties "InsertionPositionHighlighted" (that makes sense for both the caret AND the placeholder appearance) and "ShouldDrawCaret".

Because Drawing the caret is done in CSharpMath.Rendering.FrontEnd, the unit tests of CSharpMath.Editor can only test "ShouldDraw" and unit tests that do that can cover the same as before (when it was tested via a MathKeyboardCaretState enum).

Notes about moved unit tests:
- CaretIsOverriddenByPlaceholder has been replaced by PlaceholderDoesNotBlinkAndNoCaretVisible.
- CaretMovesWithPlaceholder has been replaced by NonBlinkingActivePlaceholderMoves.

@SymboLinker

@FoggyFinder

FoggyFinder

FoggyFinder

@SymboLinker

Happypig375

Happypig375

Happypig375

Happypig375

Happypig375