MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / extendLineToColumn

Function extendLineToColumn

lib/web/CodeMirror/keymap/vim.js:3042–3047  ·  view source on GitHub ↗
(cm, lineNum, column)

Source from the content-addressed store, hash-verified

3040 return s.replace(/([.?*+$\[\]\/\\(){}|\-])/g, '\\$1');
3041 }
3042 function extendLineToColumn(cm, lineNum, column) {
3043 var endCh = lineLength(cm, lineNum);
3044 var spaces = new Array(column-endCh+1).join(' ');
3045 cm.setCursor(Pos(lineNum, endCh));
3046 cm.replaceRange(spaces, cm.getCursor());
3047 }
3048 // This functions selects a rectangular block
3049 // of text with selectionEnd as any of its corner
3050 // Height of block:

Callers 1

VimFunction · 0.85

Calls 3

replaceRangeMethod · 0.80
lineLengthFunction · 0.70
PosFunction · 0.50

Tested by

no test coverage detected