Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(winborder): handle custom border chars#1984

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
saghen merged 1 commit intosaghen:mainfromseblyng:winborder_custom_chars
Jul 10, 2025

Conversation

@seblyng
Copy link
Contributor

@seblyngseblyng commentedJul 10, 2025
edited
Loading

Neovim just got support for custom border chars in the winborder option.

Assume the border characters are custom if winborder option contains,

neovim/neovim#33772

@soifou
Copy link
Collaborator

Hey, thanks for the PR!

I had a few suggestions:

  • The doc mentions a "comma-separated list of exactly 8 characters." Maybe we could validate for that directly, instead of assuming?
  • The split operation might be unnecessary sincevim.opt.winborder:get() already gives us a table.

Unrelated to your change, but while we're at it: for checking if the option exists, I think usingvim.fn.exists is a bit more direct and idiomatic than usingpcall.

@seblyng
Copy link
ContributorAuthor

The doc mentions a "comma-separated list of exactly 8 characters." Maybe we could validate for that directly, instead of assuming?

I don't think this is necessary since it should validate this when setting the option

The split operation might be unnecessary since vim.opt.winborder:get() already gives us a table.

Good point, I can try it out

Unrelated to your change, but while we're at it: for checking if the option exists, I think using vim.fn.exists is a bit more direct and idiomatic than using pcall.

I didn't know it worked for options🤔 will try this as well

@seblyngseblyngforce-pushed thewinborder_custom_chars branch from74f3980 tob1123dbCompareJuly 10, 2025 14:24
@seblyngseblyngforce-pushed thewinborder_custom_chars branch fromb1123db tofca9294CompareJuly 10, 2025 14:28
@seblyng
Copy link
ContributorAuthor

I changed to usingvim.fn.exists, and also made use ofvim.opt.winborder:get(). We need to check the length of that.

Before custom borderchars, it returned a string, but now it returns a table. It should work for both scenarios.

Before custom border chars: None of the supported string values have a length of 1, and we will fallback tovim.opt.winborder:get() which just returns the string

After custom border chars: It will always return a table, and for the string values, we need to unpack it, and for the custom border chars, we just return the table

soifou reacted with thumbs up emoji

@saghensaghen merged commita946054 intosaghen:mainJul 10, 2025
4 checks passed
@saghen
Copy link
Owner

Thank you both!

seblyng reacted with hooray emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@soifousoifousoifou approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@seblyng@soifou@saghen

[8]ページ先頭

©2009-2025 Movatter.jp