提交 ce32da2a 编写于 作者: J Johannes Rieken

add IClipboardService#readTextSync, #76847

上级 eedfed05
......@@ -241,6 +241,7 @@ suite('Snippet Variables Resolver', function () {
const clipboardService = new class implements IClipboardService {
_serviceBrand: any;
readText(): any { return readTextResult; }
readTextSync(): any { return readTextResult; }
_throw = () => { throw new Error(); };
writeText = this._throw;
readFindText = this._throw;
......@@ -274,6 +275,7 @@ suite('Snippet Variables Resolver', function () {
const clipboardService = new class implements IClipboardService {
_serviceBrand: any;
readText(): string { return readTextResult; }
readTextSync(): any { return readTextResult; }
_throw = () => { throw new Error(); };
writeText = this._throw;
readFindText = this._throw;
......
......@@ -22,6 +22,8 @@ export interface IClipboardService {
*/
readText(type?: string): string;
readTextSync(): string | undefined;
/**
* Reads text from the system find pasteboard.
*/
......
......@@ -22,6 +22,10 @@ export class ClipboardService implements IClipboardService {
return clipboard.readText(type);
}
readTextSync(): string {
return clipboard.readText();
}
readFindText(): string {
if (isMacintosh) {
return clipboard.readFindText();
......
......@@ -62,6 +62,10 @@ export class SimpleClipboardService implements IClipboardService {
return undefined;
}
readTextSync(): string | undefined {
return undefined;
}
readFindText(): string {
// @ts-ignore
return undefined;
......@@ -1172,4 +1176,4 @@ class SimpleTunnelService implements ITunnelService {
registerSingleton(ITunnelService, SimpleTunnelService);
//#endregion
\ No newline at end of file
//#endregion
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册