Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5db861c

Browse files
committed
Fixing layout bug.
Signed-off-by: realvictorprm <mueller.vpr@gmail.com>
1 parent8441f29 commit5db861c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎vsintegration/src/FSharp.Editor/CodeLens/AbstractCodeLensDisplayService.fs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,12 @@ type CodeLensDisplayService (view : IWpfTextView, buffer : ITextBuffer, layerNam
204204

205205
memberself.HandleLayoutChanged(e:TextViewLayoutChangedEventArgs)=
206206
try
207+
// We can cancel existing stuff because the algorithm supports abortion without any data loss
208+
self.LayoutChangedCts.Cancel()
209+
self.LayoutChangedCts.Dispose()
210+
self.LayoutChangedCts<-new CancellationTokenSource()
207211
letbuffer= e.NewSnapshot
208-
letrecentVisibleLineNumbers= Set[self.RecentLastVsblLineNmbr.. self.RecentLastVsblLineNmbr]
212+
letrecentVisibleLineNumbers= Set[self.RecentFirstVsblLineNmbr.. self.RecentLastVsblLineNmbr]
209213
letfirstVisibleLineNumber,lastVisibleLineNumber=
210214
letfirst,last=
211215
view.TextViewLines.FirstVisibleLine,
@@ -260,10 +264,6 @@ type CodeLensDisplayService (view : IWpfTextView, buffer : ITextBuffer, layerNam
260264
// Save the new first and last visible lines for tracking
261265
self.RecentFirstVsblLineNmbr<- firstVisibleLineNumber
262266
self.RecentLastVsblLineNmbr<- lastVisibleLineNumber
263-
// We can cancel existing stuff because the algorithm supports abortion without any data loss
264-
self.LayoutChangedCts.Cancel()
265-
self.LayoutChangedCts.Dispose()
266-
self.LayoutChangedCts<-new CancellationTokenSource()
267267

268268
self.AsyncCustomLayoutOperation visibleLineNumbers buffer
269269
|> RoslynHelpers.StartAsyncSafe self.LayoutChangedCts.Token"HandleLayoutChanged"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp