Skip to content

Commit b99586d

Browse files
author
Yatao Li
committed
cursor: do not call invalidateVisual when configuring
1 parent 4b35fc9 commit b99586d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Views/Cursor.xaml.fs

+3-4
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ type Cursor() as this =
9090
(* reconfigure the cursor *)
9191
showCursor true
9292
cursorTimerRun blinkon this.ViewModel.blinkwait
93-
this.InvalidateVisual()
93+
// this.InvalidateVisual()
9494

9595
let setCursorAnimation() =
9696
let transitions = Transitions()
@@ -113,17 +113,16 @@ type Cursor() as this =
113113
transitions.Add(y_transition)
114114
trace "cursor" "setCursorAnimation: blink=%b, move=%b" States.cursor_smoothblink States.cursor_smoothmove
115115
this.Transitions <- transitions
116-
this.Transitions |> ignore
116+
()
117117

118118
do
119119
this.Watch [
120120
this.OnRenderTick cursorConfig
121121
this.GetObservable(IsActiveProperty)
122-
|> Observable.subscribe(fun v ->
122+
|> Observable.subscribe(fun _ ->
123123
setCursorAnimation()
124124
this.InvalidateVisual())
125125
States.Register.Watch "cursor" setCursorAnimation
126-
127126
]
128127
AvaloniaXamlLoader.Load(this)
129128

0 commit comments

Comments
 (0)