mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-19 07:54:46 +00:00
fix: code assistant next change scrolling
This commit is contained in:
parent
81615f7fd6
commit
5eef1eabef
1 changed files with 2 additions and 1 deletions
|
|
@ -15,6 +15,7 @@ import com.intellij.openapi.Disposable
|
|||
import com.intellij.openapi.actionSystem.ActionManager
|
||||
import com.intellij.openapi.editor.Document
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.editor.LogicalPosition
|
||||
import com.intellij.openapi.editor.event.DocumentEvent
|
||||
import com.intellij.openapi.editor.event.DocumentListener
|
||||
import com.intellij.openapi.editor.event.VisibleAreaEvent
|
||||
|
|
@ -214,7 +215,7 @@ class CodeSuggestionDiffViewer(
|
|||
}
|
||||
|
||||
private fun scrollToChange(change: UnifiedDiffChange) {
|
||||
val pointToScroll = myEditor.offsetToXY(change.lineFragment.startOffset2)
|
||||
val pointToScroll = myEditor.logicalPositionToXY(LogicalPosition(change.line1, 0))
|
||||
pointToScroll.y -= myEditor.lineHeight
|
||||
DiffUtil.scrollToPoint(myEditor, pointToScroll, false)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue