Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the real width of window #87

Closed
C-Entropy opened this issue Nov 26, 2024 · 2 comments
Closed

How to get the real width of window #87

C-Entropy opened this issue Nov 26, 2024 · 2 comments

Comments

@C-Entropy
Copy link

C-Entropy commented Nov 26, 2024

Hi, dear developers.

When using with popwin, popwin need to use the width of window, by (window-width root-win), which olivetti mode will change.
For example, while the true value of the window is 120, it may reduce it to 82.

As a result, when using something like

(push '(" *undo-tree*" :width 0.3 :position right) popwin:special-display-config)

popwin get the wrong width, and the popwin window is too large than it should be.

Is it possible to get the real width of window?

I have open an issue here, too. emacsorphanage/popwin#151

@rnkn
Copy link
Owner

rnkn commented Nov 27, 2024

If I understand correctly you want the width of the window plus fringes and margins, in columns? You can get this with:

(/ (window-pixel-width) (frame-char-width))

@C-Entropy
Copy link
Author

Yes, it works perfectly for me, great thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants