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

[Bug] Border height is wrong when using laststatus=0 #71

Open
SirWrexes opened this issue Jul 22, 2024 · 10 comments
Open

[Bug] Border height is wrong when using laststatus=0 #71

SirWrexes opened this issue Jul 22, 2024 · 10 comments

Comments

@SirWrexes
Copy link

SirWrexes commented Jul 22, 2024

Context

I'm using winbar to display a discreet status bar atop my various splits, and I like to disable the default status bar altogether for that, using laststatus=0

Bug

The display is kinda wrong when having laststatus set to 0 to hide it in favour of winbar.
The vertical end delimiters are offset compared to the horizontal delimiters on bottom horizontal split.
image

Minimal reproduction

  1. Paste this into a lua file, e.g. /tmp/repro.lua
---@diagnostic disable: undefined-global
--# selene: allow(mixed_table)
--# selene: allow(unscoped_variables)
--# selene: allow(undefined_variable)

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

vim.o.laststatus = 0
vim.o.winbar = [[%n%=%f%m%=L%l/%L:%c (%p%%)]]

require("lazy.minit").repro {
  spec = {
    {
      "nvim-zh/colorful-winsep.nvim",
      config = true,
    },
  },
}
  1. Run nvim -u /tmp/repro.lua +split +vsplit
SirWrexes added a commit to wrex-dots/nvim that referenced this issue Jul 22, 2024
There's a small bug for now but I suppose it should be fixed soon-ish !
See nvim-zh/colorful-winsep.nvim#71
@denstiny
Copy link
Collaborator

Friend, I believe you should use laststatus=3, instead of 0. I originally created this plugin to implement laststatus=3

@denstiny
Copy link
Collaborator

Can you tell me why to use laststatus=0?

@SirWrexes
Copy link
Author

SirWrexes commented Jul 24, 2024

Because I use winbar instead and I don't want an ugly empty bar at the bottom of my screen.¯\_(ツ)_/¯
The thing is I'm most likely not the only person using laststatus=0. The option exists for a reason.
I believe you should either mention it in your README that this is not designed for of laststatus=0, or you could just implement a quick check over the value of vim.o.laststatus. 😉

Sorry lots of edits on that one, I'm working on the side. n_n'

@denstiny
Copy link
Collaborator

Because I use winbar instead and I don't want an ugly empty bar at the bottom of my screen.¯_(ツ)_/¯ The thing is I'm most likely not the only person using laststatus=0. The option exists for a reason. I believe you should either mention it in your README that this is not designed for of laststatus=0, or you could just implement a quick check over the value of vim.o.laststatus. 😉

Sorry lots of edits on that one, I'm working on the side. n_n'

Okay, I will fix this issue as soon as possible, so please be patient.

@SirWrexes
Copy link
Author

Sweet, thank you very much!

@denstiny
Copy link
Collaborator

Sweet, thank you very much!

Sorry, it's a bit complicated. If you're in a hurry, you can fix it yourself; the specific location is here: https://github.com/nvim-zh/colorful-winsep.nvim/blob/93a063e25a78c2a50441f3d1ece548465159aa1f/lua/colorful-winsep/view.lua#L50

@denstiny
Copy link
Collaborator

2024-07-26_21-25-20.mp4

@denstiny
Copy link
Collaborator

2024-07-26_21-25-20.mp4

Please mute before watching; I forgot to mute.

@SirWrexes
Copy link
Author

I'll see what I can do if I get the time for it, but no promises. 😅
In the meantime, I suppose keeping this issue open could reel in some other potential users that have a fix to propose.

I have to confess, though: I recently found a nice plugin for showing current "context" in code to use in my statusbar and I've enabled laststatus=3. 🤣

@denstiny
Copy link
Collaborator

I'll see what I can do if I get the time for it, but no promises. 😅 In the meantime, I suppose keeping this issue open could reel in some other potential users that have a fix to propose.

I have to confess, though: I recently found a nice plugin for showing current "context" in code to use in my statusbar and I've enabled laststatus=3. 🤣

Right choice😂😂😂

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