提交 ad1dc7f8 编写于 作者: M Matt Bierner

Strip newlines from the code actions title

Fixes #109869
上级 296aa890
......@@ -35,10 +35,14 @@ class CodeActionAction extends Action {
public readonly action: CodeAction,
callback: () => Promise<void>,
) {
super(action.command ? action.command.id : action.title, action.title, undefined, !action.disabled, callback);
super(action.command ? action.command.id : action.title, stripNewlines(action.title), undefined, !action.disabled, callback);
}
}
function stripNewlines(str: string): string {
return str.replace(/\r\n|\r|\n/g, ' ');
}
export interface CodeActionShowOptions {
readonly includeDisabledActions: boolean;
}
......@@ -224,3 +228,5 @@ export class CodeActionKeybindingResolver {
}, undefined as ResolveCodeActionKeybinding | undefined);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册