From ea1f1e54d0138693bac6773df5afdc44546f2802 Mon Sep 17 00:00:00 2001 From: LU XIANGRUI <1078666705@qq.com> Date: Tue, 17 Nov 2026 14:29:00 +0900 Subject: [PATCH] feat(plugins): the caret and selections in editor panels (#3904) An editor panel's page can read the caret and every selection of its group's editor with openidea.editor.selections() (main selection first, then the others in file order; 0-based lines, UTF-16 columns) and hear them through onSelections, at most once a frame, also after an edit or a file switch. Documented under API 1.10; the editor-panel minimap fixture tints the selected lines and the caret's line. Co-authored-by: wildcatDownstairs <26499420+wildcatDownstairs@users.noreply.github.com> --- .../fixtures/editor-panel/web/index.html | 20 ++++- plugins/README.md | 14 ++- .../plugins/__tests__/editorPanels.test.tsx | 89 ++++++++++++++++++- src/features/plugins/views/WebView.tsx | 19 +++- src/features/plugins/views/editorPanel.tsx | 26 +++++- src/features/plugins/views/frame-bridge.js | 6 +- 6 files changed, 164 insertions(+), 10 deletions(-) diff --git a/crates/ide-plugin/tests/fixtures/editor-panel/web/index.html b/crates/ide-plugin/tests/fixtures/editor-panel/web/index.html index 9d0ced588..f20413d63 100644 --- a/crates/ide-plugin/tests/fixtures/editor-panel/web/index.html +++ b/crates/ide-plugin/tests/fixtures/editor-panel/web/index.html @@ -23,7 +23,8 @@