fix: incorrect scroll logic on inline edit

This commit is contained in:
Test 2024-10-21 18:24:52 -07:00
parent c42248f868
commit ed3af3f3fc
2 changed files with 8 additions and 3 deletions

View file

@ -0,0 +1,8 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Continue" type="CompoundRunConfigurationType">
<toRun name="Run Extension" type="GradleRunConfiguration" />
<toRun name="GUI: Start Dev Server" type="js.build_tools.npm" />
<toRun name="Tail Dev Logs" type="ShConfigurationType" />
<method v="2" />
</configuration>
</component>

View file

@ -241,9 +241,6 @@ fun openInlineEdit(project: Project?, editor: Editor) {
val viewport = (editor as? EditorImpl)?.scrollPane?.viewport
viewport?.dispatchEvent(ComponentEvent(viewport, ComponentEvent.COMPONENT_RESIZED))
// Scroll to the top of the startLine plus the height of the panel
editor.scrollingModel.scrollVertically(editor.visualLineToY(startLineNumber) - panel.height)
// Add key listener to text area
textArea.addKeyListener(
object : KeyAdapter() {