MCPcopy
hub / github.com/witheve/Eve / extendLineToColumn

Function extendLineToColumn

src/codemirror.js:12096–12101  ·  view source on GitHub ↗
(cm, lineNum, column)

Source from the content-addressed store, hash-verified

12094 return s.replace(/([.?*+$\[\]\/\\(){}|\-])/g, '\\$1');
12095 }
12096 function extendLineToColumn(cm, lineNum, column) {
12097 var endCh = lineLength(cm, lineNum);
12098 var spaces = new Array(column-endCh+1).join(' ');
12099 cm.setCursor(Pos(lineNum, endCh));
12100 cm.replaceRange(spaces, cm.getCursor());
12101 }
12102 // This functions selects a rectangular block
12103 // of text with selectionEnd as any of its corner
12104 // Height of block:

Callers 1

VimFunction · 0.85

Calls 4

lineLengthFunction · 0.85
setCursorMethod · 0.80
replaceRangeMethod · 0.80
getCursorMethod · 0.80

Tested by

no test coverage detected