Using screen lines instead of line numbers to calculate the nlines allows to
support narrowed buffers.
Includes workaround for the both problems in #2 in commit 85a7d5bfeaf3257c9191e71e60e301e27663bea2.
The workaround is to advice to some emacs primitives. Advicing emacs primitives should be avoided, so the commit 85a7d5bfeaf3257c9191e71e60e301e27663bea2 could be dropped but I cannot find any other way.
Using screen lines instead of line numbers to calculate the nlines allows to support narrowed buffers.
Includes workaround for the both problems in #2 in commit 85a7d5bfeaf3257c9191e71e60e301e27663bea2. The workaround is to advice to some emacs primitives. Advicing emacs primitives should be avoided, so the commit 85a7d5bfeaf3257c9191e71e60e301e27663bea2 could be dropped but I cannot find any other way.