[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `window-hscroll' does not report correct value when `text-scale-mode
From: |
Eli Zaretskii |
Subject: |
Re: `window-hscroll' does not report correct value when `text-scale-mode' is on |
Date: |
Fri, 19 May 2017 09:39:18 +0300 |
> From: 路客 <address@hidden>
> Date: Fri, 19 May 2017 09:10:23 +0800
> Cc: Emacs developers <address@hidden>
>
> 1. How should we fix `ruler-mode' to make it correct when
> `text-scale-mode' is ON?
I don't think I understand what needs fixing. Is this question
different from the second one, i.e. if you can compute a suitable
value requested in your second question, is there something else that
needs fixing in ruler-mode? If so, what else needs fixing?
> 2. When `text-scale-mode' is ON, how can I get the correct
> `window-hscroll' value respect to current text scaling?
I think you can do this:
(* (/ (window-hscroll) (frame-char-width)) (default-font-width))
I should add that default-font-width can sometimes be expensive, so
don't put the above into some tight loop.