Skip to content

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

@ilan-schemoul

Description

@ilan-schemoul

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions