From 9ce68e3cb176476a9b626ab63f4c64b826abaa9c Mon Sep 17 00:00:00 2001 From: Hawtian Wang Date: Fri, 8 Dec 2023 12:00:20 +0800 Subject: [PATCH] ... --- src/core/components/image/image.ts | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/src/core/components/image/image.ts b/src/core/components/image/image.ts index 821315e9..7ea57a19 100644 --- a/src/core/components/image/image.ts +++ b/src/core/components/image/image.ts @@ -119,6 +119,10 @@ export class Image { debug_("termSize: %s", vim.inspect(termSize)); } debug_("render image at (%s, %s)", x, y); + this._transmit(); + vim.wait(10, () => { + return false; + }); KittyBackend.getInstance().writeGraphics({ action: "p", quiet: 2, @@ -133,25 +137,6 @@ export class Image { cursorMovementPolicy: 1, }, }); - // KittyBackend.getInstance().writeGraphics( - // { - // action: "T", - // quiet: 2, - // transmission: { - // imageId: this.id, - // format: toFormatCode(this.format), - // placementId: this.id, - // }, - // display: { - // xOffset: ifNil(x, 0), - // yOffset: ifNil(x, 0), - // z: ifNil(z, 0), - // cursorMovementPolicy: 1, - // }, - // }, - // this.data - // ); - // termSyncEnd(); this.rendered = true; }