Skip to content

Introduce scale_factor option #1589

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

Merged
merged 2 commits into from
Oct 8, 2022

Conversation

BHatGuy
Copy link
Contributor

@BHatGuy BHatGuy commented Oct 6, 2022

What kind of change does this PR introduce?

  • Feature

Did this PR introduce a breaking change?

A breaking change includes anything that breaks backwards compatibility either at compile or run time.

  • No

I tried to implement the scaling proposed in #1301. I decided to use an additional factor to the os_scale_factor.

Example for using the new scale_factor with key bindings:

let g:neovide_scale_factor=1.0
function! ChangeScaleFactor(delta)
    let g:neovide_scale_factor = g:neovide_scale_factor * a:delta
endfunction
nnoremap <expr><C-=> ChangeScaleFactor(1.25)
nnoremap <expr><C--> ChangeScaleFactor(1/1.25)

@MultisampledNight
Copy link
Contributor

This is great, thank you! I'll add the snippet to the FAQ.

@MultisampledNight
Copy link
Contributor

(by the way, you might want to check out cargo fmt and g:rustfmt_autosave)

@TRPB
Copy link

TRPB commented Sep 30, 2024

Thanks for this @BHatGuy. I've noticed on 0.12.2 at least that I have to press another key after changing the scale factor, it's not instant. Is there any way we can trigger an instant change? It doesn't seem to matter what is key is pressed, even a mouse click works.

I wonder if there's some kind of refresh() function we can call to force it each execution?

@fredizzimo
Copy link
Member

fredizzimo commented Sep 30, 2024

It should be instant in the latest 0.13.3 release, and some releases before that.

It was probably this one that fixed it:

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

Successfully merging this pull request may close these issues.

4 participants