Function: window-vscroll

window-vscroll is a function defined in window.c.

Signature

(window-vscroll &optional WINDOW PIXELS-P)

Documentation

Return the amount by which WINDOW is scrolled vertically.

This takes effect when displaying tall lines or images.

If WINDOW is omitted or nil, it defaults to the selected window. Normally, value is a multiple of the canonical character height of WINDOW; optional second arg PIXELS-P means value is measured in pixels.

Probably introduced at or before Emacs version 21.1.

Source Code

// Defined in /usr/src/emacs/src/window.c
{
  Lisp_Object result;
  struct window *w = decode_live_window (window);
  struct frame *f = XFRAME (w->frame);

  if (FRAME_WINDOW_P (f))
    result = (NILP (pixels_p)
	      ? FRAME_CANON_Y_FROM_PIXEL_Y (f, -w->vscroll)
	      : make_fixnum (-w->vscroll));
  else
    result = make_fixnum (0);
  return result;
}