MCPcopy Create free account
hub / github.com/continuedev/continue / deleteLineBackward

Method deleteLineBackward

extensions/cli/src/ui/TextBuffer.ts:140–155  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138 }
139
140 private deleteLineBackward(): void {
141 if (this._cursor === 0) {
142 return;
143 }
144
145 const lastNewline = this._text.lastIndexOf("\n", this._cursor - 1);
146 const lineStart = lastNewline === -1 ? 0 : lastNewline + 1;
147
148 if (lineStart === this._cursor) {
149 return;
150 }
151
152 this._text =
153 this._text.slice(0, lineStart) + this._text.slice(this._cursor);
154 this._cursor = lineStart;
155 }
156
157 private deleteLineForward(): void {
158 if (this._cursor >= this._text.length) {

Callers 2

handleCtrlKeyMethod · 0.95
handleMetaKeyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected