Alexander-Miller / treemacs

GNU General Public License v3.0
2.09k stars 153 forks source link

treemacs-text-scale should use the absolute value instead of incrementally increasing or decreasing the current value #1100

Open ydzhou opened 6 months ago

ydzhou commented 6 months ago

Right now set treemacs-text-scale to be -1 seems just decrease the current font size by 1. If I repeatedly call this method, it will decrease the font-size multiple time.

Can we provide a new option or change this option to have the value to be fixed. -1 simply means set the font size to be the size of our current font minus one? So if I have a 16pt size font for emacs, treemacs will use 15pt for treemacs. And it will not decrease further if I call this multiple time.

Alexander-Miller commented 4 months ago

It is a relative value because, as the docs say, it is simply passed on to text-scale-increase.

And it will not decrease further if I call this multiple time.

The text scale is set during major-mode initialization. How are you managing to set it multiple times?

ydzhou commented 4 months ago

I use emacs-daemon. If I create multiple clients, this value will be set multiple times and get the error that it cannot be decreased anymore.

Alexander-Miller commented 4 months ago

Can you give me a reproduction recipe? I tried starting a few clients of my own but didn't see anything wrong.

stale[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity (this bot only works as a reminder, it will not close issues).