MCPcopy Index your code
hub / github.com/philc/vimium / selectLine

Method selectLine

content_scripts/mode_visual.js:205–215  ·  view source on GitHub ↗
(count)

Source from the content-addressed store, hash-verified

203 }
204
205 selectLine(count) {
206 // Even under caret mode, we still need an extended selection here.
207 this.alterMethod = "extend";
208 if (this.getDirection() === forward) this.reverseSelection();
209 this.runMovement(backward, lineboundary);
210 this.reverseSelection();
211 for (let i = 1, end = count; i < end; i++) this.runMovement(forward, line);
212 this.runMovement(forward, lineboundary);
213 // Include the next character if that character is a newline.
214 if (this.getNextForwardCharacter() === "\n") return this.runMovement(forward, character);
215 }
216
217 // Scroll the focus into view.
218 scrollIntoView() {

Callers 1

"Y"Function · 0.80

Calls 4

getDirectionMethod · 0.95
reverseSelectionMethod · 0.95
runMovementMethod · 0.95

Tested by

no test coverage detected