Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use currentOrPreviousFocusedEditor on search #2761

Merged
merged 2 commits into from
May 30, 2023

Conversation

pipiiiiii
Copy link
Contributor

@pipiiiiii pipiiiiii commented May 30, 2023

Types

  • 🐛 Bug Fixes

Background or solution

🤖 Generated by Copilot at f962428

  • Add a getter method currentOrPreviousFocusedEditor to return the current or previous focused editor in the current editor group (link)
  • Use the currentOrPreviousFocusedEditor method to search the selection of the last focused editor in the searchEditorSelection method of the ContentSearchClientService class (link)

fix: #2759

Changelog

🤖 Generated by Copilot at f962428

This pull request enhances the editor and search features of the workbench by introducing a new method currentOrPreviousFocusedEditor that returns the last focused editor in the current group. This method is used by the searchEditorSelection method to search the selection of the last focused editor, regardless of the current focus.

@opensumi opensumi bot added the 🐞 bug Something isn't working label May 30, 2023
@pipiiiiii pipiiiiii requested review from erha19 and Ricbet May 30, 2023 08:17
@opensumi
Copy link
Contributor

opensumi bot commented May 30, 2023

ChatGPT Code Review:

该代码是在修复一个问题时引入的更改。主要变化是为 WorkbenchEditorServiceImpl 添加了一个 currentOrPreviousFocusedEditor 的 get 方法,该方法用于获取当前焦点或上一个焦点的编辑器。该方法在 ContentSearchClientService 类的 searchEditorSelection 方法中被使用,以搜索最近使用过的编辑器的选择内容。

@opensumi opensumi bot added the 🎨 feature feature required label May 30, 2023
@codecov
Copy link

codecov bot commented May 30, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (4b65fc4) 57.72% compared to head (fafa838) 57.72%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2761   +/-   ##
=======================================
  Coverage   57.72%   57.72%           
=======================================
  Files        1327     1327           
  Lines       83582    83584    +2     
  Branches    17379    17380    +1     
=======================================
+ Hits        48246    48253    +7     
+ Misses      32115    32111    -4     
+ Partials     3221     3220    -1     
Flag Coverage Δ
jsdom 52.73% <0.00%> (+<0.01%) ⬆️
node 16.79% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ges/editor/src/browser/workbench-editor.service.ts 59.15% <0.00%> (-0.11%) ⬇️
packages/editor/src/common/editor.ts 100.00% <ø> (ø)
packages/search/src/browser/search.service.ts 49.76% <0.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pipiiiiii pipiiiiii merged commit 638f5d8 into main May 30, 2023
12 checks passed
@pipiiiiii pipiiiiii deleted the fix/search-diffeditor branch May 30, 2023 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🎨 feature feature required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] 选中 DiffEditor 内容后全局搜索失效
2 participants