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

Setting some options in rc file only apply to one view on start #879

Closed
gerardroche opened this issue May 22, 2023 · 1 comment
Closed

Comments

@gerardroche
Copy link
Contributor

Some options are only applied the currently opened file on load e.g. 'scrolloff'.

Setting 'scrolloff' in the neovintageousrc file should work, but I've just noticed a bug. It only sets in on startup for currently opened file and then defaults back to the Sublime Text scroll_context_lines setting. Setting 'scrolloff' on the fly works e.g. :set scrolloff=8

Re #875 (comment)

@gerardroche
Copy link
Contributor Author

gerardroche commented May 22, 2023

The reason is because instead of implementing context scrolling, we use Sublime Text's built in context_scroll_lines settings. So setting :scrolloff=8 on the fly works because sets actually sets context_scroll_lines at the view level. But the rc file works on a at a global level. However, in order to set it globally we have modify the global preferences, which would be right at the rc level but not at the view level.

The rc file loader needs some way to indicate that any Sublime Text proxied options being set need to be set globally e.g. if set scrolloff=8 is being set it needs to update the global context_scroll_lines setting. Currently it just sets at the view level.

@gerardroche gerardroche added this to the 1.31.0 milestone May 24, 2023
@gerardroche gerardroche removed this from the 1.31.0 milestone Jul 1, 2023
@gerardroche gerardroche added this to the 1.32.0 milestone Jul 12, 2023
eugenesvk pushed a commit to eugenesvk/NeoVintageous that referenced this issue Jan 6, 2024
eugenesvk pushed a commit to eugenesvk/NeoVintageous that referenced this issue Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant