fix(option): allow empty/blank edges in 'winborder' #40112

Problem:
The comma form of 'winborder' is split with copy_option_part(),
whose skip_to_option_part() eats spaces after a comma, and empty
fields are rejected.

Solution:
Split the comma form literally on ',', keeping empty fields and
single-space fields.
This commit is contained in:
glepnir
2026-06-05 18:37:07 +08:00
committed by GitHub
parent e887cfb3b5
commit 11b9e6f193
5 changed files with 38 additions and 26 deletions

View File

@@ -10602,9 +10602,12 @@ local options = {
- "shadow": Drop shadow effect, by blending with the background.
- "single": Single-line box.
- "solid": Adds padding by a single whitespace cell.
- custom: comma-separated list of exactly 8 characters in clockwise
order starting from topleft. Example: >lua
vim.o.winborder='+,-,+,|,+,-,+,|'
- custom: comma-separated list of exactly 8 entries in clockwise
order starting from topleft. Each entry may be a single char, a
single space (filled with the background), or empty (no border on
that side). Example: >lua
vim.o.winborder = '+,-,+,|,+,-,+,|'
vim.o.winborder = ',,, ,,,, ' -- left/right padding only
<
]=],
short_desc = N_('border of floating window'),