Function: ediff-get-lines-to-region-end

ediff-get-lines-to-region-end is a byte-compiled function defined in ediff-util.el.gz.

Signature

(ediff-get-lines-to-region-end BUF-TYPE &optional N CTL-BUF)

Source Code

;; Defined in /usr/src/emacs/lisp/vc/ediff-util.el.gz
;; get number of lines from window start to region end
(defun ediff-get-lines-to-region-end (buf-type &optional n ctl-buf)
  (or n (setq n ediff-current-difference))
  (or ctl-buf (setq ctl-buf ediff-control-buffer))
  (ediff-with-current-buffer ctl-buf
    (let* ((buf (ediff-get-buffer buf-type))
	   (wind (symbol-value (ediff-get-symbol-from-alist
                                buf-type ediff-window-alist)))
	   (beg (window-start wind))
	   (end (ediff-get-diff-posn buf-type 'end))
	   lines)
      (ediff-with-current-buffer buf
	(if (< beg end)
	    (setq lines (count-lines beg end))
	  (setq lines 0))
	lines
	))))