mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 09:02:08 +00:00
fix(tui): use the non-null assertion operator instead of assert()
This commit is contained in:
parent
bacf334bc4
commit
6bde679a5f
1 changed files with 1 additions and 3 deletions
|
|
@ -1,4 +1,3 @@
|
||||||
import assert from "node:assert";
|
|
||||||
import type { AutocompleteProvider, CombinedAutocompleteProvider } from "../autocomplete.js";
|
import type { AutocompleteProvider, CombinedAutocompleteProvider } from "../autocomplete.js";
|
||||||
import { getEditorKeybindings } from "../keybindings.js";
|
import { getEditorKeybindings } from "../keybindings.js";
|
||||||
import { matchesKey } from "../keys.js";
|
import { matchesKey } from "../keys.js";
|
||||||
|
|
@ -1621,8 +1620,7 @@ export class Editor implements Component, Focusable {
|
||||||
this.deleteYankedText();
|
this.deleteYankedText();
|
||||||
|
|
||||||
// Rotate the ring: move end to front
|
// Rotate the ring: move end to front
|
||||||
const lastEntry = this.killRing.pop();
|
const lastEntry = this.killRing.pop()!;
|
||||||
assert(lastEntry !== undefined); // Since killRing was not empty
|
|
||||||
this.killRing.unshift(lastEntry);
|
this.killRing.unshift(lastEntry);
|
||||||
|
|
||||||
// Insert the new most recent entry (now at end after rotation)
|
// Insert the new most recent entry (now at end after rotation)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue