* src/xdisp.c (display_count_lines_logically): New function,
counts line numbers disregarding narrowing. Suggested by Andy
Moreton <andrewjmoreton@gmail.com>.
(maybe_produce_line_number): Call display_count_lines_logically
instead of display_count_lines. Adapt BEGV, ZV, etc. to
display-line-numbers-widen.
(syms_of_xdisp) <display-line-numbers-widen>: New buffer-local
variable.
* lisp/cus-start.el (standard): Provide a customization form for
display-line-numbers-widen.
* lisp/frame.el: Add display-line-numbers-widen,
display-line-numbers-current-absolute, and
display-line-number-width to the list of variables that should
trigger redisplay of the current buffer.