Fix inlay hint location links problem#167886
Conversation
jrieken
left a comment
There was a problem hiding this comment.
Thanks so far. Left a suggestion to avoid a dependency between inlay and goto contributions
| } | ||
|
|
||
| override runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, arg?: SymbolNavigationAnchor | unknown, range?: Range): Promise<void> { | ||
| override runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: [ICodeEditor, SymbolNavigationAnchor | unknown, Range | undefined]): Promise<void> { |
There was a problem hiding this comment.
I don't think this change is needed and I do believe that it will break existing callers
There was a problem hiding this comment.
There was a mismatch between callers and this before my PR, and it was the reason it wasn't working correctly. So either the caller in editorExtensions.ts:455 or here needs to be changed. And the caller is more generic, so I think changing here is correct. And other inherited classes of EditorAction2 all have an args argument as third argument, and no more arguments:
src/vs/editor/contrib/gotoSymbol/browser/goToCommands.ts
106: override runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: [ICodeEditor, SymbolNavigationAnchor | unknown, Range | undefined]): Promise<void> {
src/vs/editor/contrib/folding/browser/folding.ts
529: public override runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: T): void | Promise<void> {
src/vs/editor/browser/coreCommands.ts
36: public runEditorCommand(accessor: ServicesAccessor | null, editor: ICodeEditor, args?: Partial<T> | null): void {
1885: public runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: unknown): void {
1961: public runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: unknown): void {
2095: public runEditorCommand(accessor: ServicesAccessor | null, editor: ICodeEditor, args: unknown): void | Promise<void> {
2110: public runEditorCommand(accessor: ServicesAccessor | null, editor: ICodeEditor, args: unknown): void | Promise<void> {
src/vs/editor/browser/editorExtensions.ts
276: public runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: any): void {
377: public runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: any): void | Promise<void> {
src/vs/editor/contrib/wordOperations/browser/wordOperations.ts
44: public runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: any): void {
333: public runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: any): void {
src/vs/editor/contrib/codeAction/browser/codeActionCommands.ts
210: public runEditorCommand(_accessor: ServicesAccessor, editor: ICodeEditor, userArgs: any) {
src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts
1675: public runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor) {
1705: public runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor) {
1723: public runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor) {
1750: public runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor) {
There was a problem hiding this comment.
jrieken
left a comment
There was a problem hiding this comment.
I pushed some changes as described and I am going ahead to merge this PR. Thanks!
|
@jrieken the problem appears again after your changes. |
fix #167564
The changes in
goToDefinitionAtPosition.tsdisable decoration of the nearest token on hover with Ctrl, and the other changes fix the target when clicking. I didn't find out how to add a test for it but I can do that with some mentoring if needed.