@hediet the multi diff editor needs to make sure to implement some methods from EditorPane to better integrate into the workbench. For this specifically:
focus
hasFocus
I think you already have some experience in this area, given the merge editor: vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.ts Lines 455 to 468 in 983a3bc | | overridefocus(): void{ | | | super.focus(); | | | | | | (this.getControl()??this.inputResultView.editor).focus(); | | | } | | | | | | overridehasFocus(): boolean{ | | | for(const{ editor }of[this.input1View,this.input2View,this.inputResultView]){ | | | if(editor.hasTextFocus()){ | | | returntrue; | | | } | | | } | | | returnsuper.hasFocus(); | | | } | Let me know if you need help.
5条答案
按热度按时间t9eec4r01#
这个功能请求现在是我们待办事项列表的候选项目。社区有60天的时间对这个问题进行投票。如果它收到20个赞成票,我们将把它移到我们的待办事项列表中。如果没有,我们将关闭它。要了解更多关于我们如何处理功能请求的信息,请参阅我们的documentation。
快乐编码!
abithluo2#
@hediet the multi diff editor needs to make sure to implement some methods from
EditorPane
to better integrate into the workbench. For this specifically:focus
hasFocus
I think you already have some experience in this area, given the merge editor:
vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.ts
Lines 455 to 468 in 983a3bc
| | overridefocus(): void{ |
| | super.focus(); |
| | |
| | (this.getControl()??this.inputResultView.editor).focus(); |
| | } |
| | |
| | overridehasFocus(): boolean{ |
| | for(const{ editor }of[this.input1View,this.input2View,this.inputResultView]){ |
| | if(editor.hasTextFocus()){ |
| | returntrue; |
| | } |
| | } |
| | returnsuper.hasFocus(); |
| | } |
Let me know if you need help.
nom7f22z3#
在这里开始了PR #204970 ,但需要一些帮助。
b1zrtrql4#
已修复在 #204970
剩余的错误已在 #205567 中跟踪。
bn31dyow5#
next.mov