minimal extui fuzzy finder for neovim

fix(builtins): highlights `"xxx"` indicator

- set padding to minimal of 1
- highlight the `"xxx"` indicator

+4 -1
+4 -1
lua/artio/builtins.lua
··· 367 367 return { hl:sub(1, sp - 1), hl } 368 368 end) 369 369 :fold({}, function(t, hl) 370 - local pad = math.max(0, math.min(20, maxw) - #hl[1] + 1) 370 + local pad = math.max(1, math.min(20, maxw) - #hl[1] + 1) 371 371 t[hl[1]] = string.gsub(hl[2], "%s+", (" "):rep(pad), 1) 372 372 return t 373 373 end) ··· 385 385 return hls[hlname] 386 386 end, 387 387 hl_item = function(hlname) 388 + local x_start, x_end = string.find(hlname.text, "%sxxx") 389 + 388 390 return { 389 391 { { 0, #hlname.v }, hlname.v }, 392 + { { x_start, x_end }, hlname.v }, 390 393 } 391 394 end, 392 395 }, props)