Skip to content

Commit 022acdd

Browse files
authored
Merge branch 'main' into node-module-res
2 parents a45c871 + a5946c9 commit 022acdd

File tree

3 files changed

+1
-16
lines changed

3 files changed

+1
-16
lines changed

packages/core/src/examples/extmarks-demo.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
TextRenderable,
77
KeyEvent,
88
type ExtmarksController,
9-
type ExtmarkDeletedEvent,
109
} from "../index.js"
1110
import { setupCommonDemoKeys } from "./lib/standalone-keys.js"
1211
import { SyntaxStyle } from "../syntax-style.js"
@@ -90,13 +89,6 @@ export async function run(rendererInstance: CliRenderer): Promise<void> {
9089

9190
findAndMarkVirtualRanges()
9291

93-
extmarksController.on("extmark-deleted", (event: ExtmarkDeletedEvent) => {
94-
if (helpText) {
95-
const extmark = event.extmark
96-
helpText.content = `Deleted extmark at ${extmark.start}-${extmark.end} via ${event.trigger}`
97-
}
98-
})
99-
10092
helpText = new TextRenderable(renderer, {
10193
id: "help",
10294
content: "Move cursor with arrows. Try backspacing at end of [VIRTUAL] markers!",

packages/core/src/examples/index.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,6 @@ const examples: Example[] = [
196196
run: linkDemo.run,
197197
destroy: linkDemo.destroy,
198198
},
199-
{
200-
name: "Extmarks Demo",
201-
description: "Virtual extmarks - text ranges that cursor jumps over, like inline tags and links",
202-
run: extmarksDemo.run,
203-
destroy: extmarksDemo.destroy,
204-
},
205199
{
206200
name: "Opacity Demo",
207201
description: "Box opacity and transparency effects with animated opacity transitions",

packages/core/src/renderer.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,7 @@ export class CliRenderer extends EventEmitter implements RenderContext {
589589
this.maxFps = config.maxFps || 60
590590
this.targetFrameTime = 1000 / this.targetFps
591591
this.minTargetFrameTime = 1000 / this.maxFps
592+
this.clock = config.clock ?? new SystemClock()
592593
this.memorySnapshotInterval = config.memorySnapshotInterval ?? 0
593594
this.gatherStats = config.gatherStats || false
594595
this.maxStatSamples = config.maxStatSamples || 300
@@ -634,8 +635,6 @@ export class CliRenderer extends EventEmitter implements RenderContext {
634635

635636
this.addExitListeners()
636637

637-
this.clock = config.clock ?? new SystemClock()
638-
639638
const stdinParserMaxBufferBytes = config.stdinParserMaxBufferBytes ?? DEFAULT_STDIN_PARSER_MAX_BUFFER_BYTES
640639
this.stdinParser = new StdinParser({
641640
timeoutMs: 10,

0 commit comments

Comments
 (0)