MCPcopy Create free account
hub / github.com/nodejs/node / [kMoveUpOrHistoryPrev]

Method [kMoveUpOrHistoryPrev]

lib/internal/readline/interface.js:1157–1166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1155 }
1156
1157 [kMoveUpOrHistoryPrev]() {
1158 const cursorPos = this.getCursorPos();
1159 if (this[kIsMultiline] && cursorPos.rows > 0) {
1160 const splitLines = StringPrototypeSplit(this.line, '\n');
1161 this[kMultilineMove](-1, splitLines, cursorPos);
1162 return;
1163 }
1164 this[kPreviousCursorCols] = -1;
1165 this[kHistoryPrev]();
1166 }
1167
1168 [kHistoryPrev]() {
1169 if (!this.historyManager.canNavigateToPrevious()) { return; }

Callers

nothing calls this directly

Calls 1

getCursorPosMethod · 0.95

Tested by

no test coverage detected