message: Don't assume `vimState.editor.visibleRanges` is non-empty
  Fixes
diff: @@ -466,11 +466,15 @@ abstract class CommandEditorScroll extends BaseCommand {
  public override async exec(position: Position, vimState: VimState): Promise<void> {
  const timesToRepeat = vimState.recordedState.count || 1;
  - const visibleRange = vimState.editor.visibleRanges[0];
  const scrolloff = configuration
  .getConfiguration('editor')
  .get<number>('cursorSurroundingLines', 0);
  + const visibleRange = vimState.editor.visibleRanges[0];
  + if (visibleRange === undefined) {
  + return;
  + }
  +
  const linesAboveCursor =
  visibleRange.end.line - vimState.cursorStopPosition.line - timesToRepeat;
  const linesBelowCursor =
  @@ -530,14 +534,17 @@ abstract class CommandScrollAndMoveCursor extends BaseCommand {
  /**
  * @returns the number of lines this command should move the cursor
  */
  - protected abstract getNumLines(vimState: VimState): number;
  + protected abstract getNumLines(visibleRanges: vscode.Range[]): number;
  public override async exec(position: Position, vimState: VimState): Promise<void> {
  const { visibleRanges } = vimState.editor;
  + if (visibleRanges.length === 0) {
  + return;
  + }
  const smoothScrolling = configuration
  .getConfiguration('editor')
  .get<boolean>('smoothScrolling', false);
  - const moveLines = (vimState.actionCount || 1) * this.getNumLines(vimState);
  + const moveLines = (vimState.actionCount || 1) * this.getNumLines(visibleRanges);
  let scrollLines = moveLines;
  if (this.to === 'down') {
  @@ -583,9 +590,8 @@ class CommandMoveFullPageUp extends CommandScrollAndMoveCursor {
  keys = ['<C-b>'];
  to: EditorScrollDirection = 'up';
  - protected getNumLines(vimState: VimState) {
  - const visible = vimState.editor.visibleRanges[0];
  - return visible.end.line - visible.start.line;
  + protected getNumLines(visibleRanges: vscode.Range[]) {
  + return visibleRanges[0].end.line - visibleRanges[0].start.line;
  }
  }
  @@ -594,9 +600,8 @@ class CommandMoveFullPageDown extends CommandScrollAndMoveCursor {
  keys = ['<C-f>'];
  to: EditorScrollDirection = 'down';
  - protected getNumLines(vimState: VimState) {
  - const visible = vimState.editor.visibleRanges[0];
  - return visible.end.line - visible.start.line;
  + protected getNumLines(visibleRanges: vscode.Range[]) {
  + return visibleRanges[0].end.line - visibleRanges[0].start.line;
  }
  }
  @@ -605,8 +610,8 @@ class CommandMoveHalfPageDown extends CommandScrollAndMoveCursor {
  keys = ['<C-d>'];
  to: EditorScrollDirection = 'down';
  - protected getNumLines(vimState: VimState) {
  - return configuration.getScrollLines(vimState.editor.visibleRanges);
  + protected getNumLines(visibleRanges: vscode.Range[]) {
  + return configuration.getScrollLines(visibleRanges);
  }
  }
  @@ -615,8 +620,8 @@ class CommandMoveHalfPageUp extends CommandScrollAndMoveCursor {
  keys = ['<C-u>'];
  to: EditorScrollDirection = 'up';
  - protected getNumLines(vimState: VimState) {
  - return configuration.getScrollLines(vimState.editor.visibleRanges);
  + protected getNumLines(visibleRanges: vscode.Range[]) {
  + return configuration.getScrollLines(visibleRanges);
  }
  }
  