MCPcopy
hub / github.com/VSCodeVim/Vim / scrollView

Function scrollView

src/util/util.ts:22–35  ·  view source on GitHub ↗
(vimState: VimState, offset: number)

Source from the content-addressed store, hash-verified

20}
21
22export function scrollView(vimState: VimState, offset: number) {
23 if (offset !== 0) {
24 vimState.postponedCodeViewChanges.push({
25 command: 'editorScroll',
26 args: {
27 to: offset > 0 ? 'up' : 'down',
28 by: 'line',
29 value: Math.abs(offset),
30 revealCursor: false,
31 select: false,
32 },
33 });
34 }
35}
36
37export function assertDefined<X>(x: X | undefined, err: string): asserts x {
38 if (x === undefined) {

Callers 2

updateViewMethod · 0.90
escapeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected