[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

line-pixel-height beyond eol

From: Tak Kunihiro
Subject: line-pixel-height beyond eol
Date: Tue, 12 Sep 2017 19:12:23 +0900

I want to scroll pixel-wise with auto-hscroll-mode off.

When auto-hscroll-mode is nil, `hollow’ cursor can go over the end
of line with an inline image.  As soon as the image is scrolled out to
the left, on display, height of line shrinks to frame-char-height.

Since point is on the line, the function `line-pixel-height’ returns
height of image instead of that of text.

  GNU Emacs 26.0.50 (build 3, x86_64-apple-darwin13.4.0, NS appkit-1265.21 
Version 10.9.5 (Build 13F1911))
  src/emacs -Q
  M-x eww
  C-n 16 times (to reach to GNU image)
  M-: (line-pixel-height) => 144
  M-: (setq auto-hscroll-mode nil)
  M-: (set-window-hscroll nil 256)
  M-: (line-pixel-height) => 144

  -- Function: line-pixel-height
     This function returns the height in pixels of the line at point in
     the selected window.  The value includes the line spacing of the
     line (*note Line Height::).

Is there a way to obtain the height in pixels of the line at the `hollow’
point in the selected window?  Or is there a way to maintain the height of
a line even when an image is horizontally scrolled out?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]