···169169 self.idx = math.min(self.idx, #self.matches)
170170end
171171172172+local function item_is_structured(item)
173173+ return type(item) == "table" and item.id and item.v and item.text
174174+end
175175+172176function Picker:getitems(input)
173177 self.items = self.get_items and self.get_items(input) or self.items
174174- if
175175- #self.items > 0
176176- and (type(self.items[1]) ~= "table" or not (self.items[1].v and self.items[1].id and self.items[1].text))
177177- then
178178+ if #self.items > 0 and not item_is_structured(self.items[1]) then
178179 self.items = vim
179180 .iter(ipairs(self.items))
180181 :map(function(i, v)