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

Hiding numbers is broken when absolute number+relative number (hybrid) #135

Open
ilan-schemoul opened this issue Jul 27, 2024 · 0 comments

Comments

@ilan-schemoul
Copy link

ilan-schemoul commented Jul 27, 2024

In minimalist and ataraxis mode numbers are supposed to be hidden. But it's buggy. Instead of hiding numbers it only disables absolute number but keep the relativenumber.
Before minimalist (absolute + relative)
Capture d'écran 2024-07-27 224810
after minimalist
Capture d'écran 2024-07-27 224820
Only absolute numbers are removed. Not the relative ones.

The obvious workaround is callbacks

          open_pos = function()
            vim.cmd("ScrollbarHide")
            vim.cmd("setl nonumber")
            vim.cmd("setl norelativenumber")
          end,
          close_pos = function()
            vim.cmd("ScrollbarShow")
            vim.cmd("setl number")
            vim.cmd("setl relativenumber")
          end,

I think the code to disable numbers is complex (especially alldo()). One can just use local settings with setl.
@pocco81 can you care to explain the original design ?

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

1 participant