github skywind3000/vim-quickui 1.5.2
20260502 - v1.5.2

latest release: 1.5.4
6 hours ago

dialog: replace opts.focus with control-level focus field:

Move initial focus specification from opts.focus (string name) to a per-control 'focus' field (integer). This allows specifying both which control receives focus and the sub-item index within group controls (button/radio). Deprecated opts.focus now shows a warning message.

Example:

function! Test_dialog_focus()
	let items = [
		\ {'type': 'input', 'name': 'user', 'prompt': 'User:', 'value': 'admin'},
		\ {'type': 'input', 'name': 'pass', 'prompt': 'Pass:'},
		\ {'type': 'button', 'name': 'confirm', 'items': [' &Login ', ' &Cancel '], 'focus': 0},
		\ ]
	let result = quickui#dialog#open(items, {'title': 'Focus Test'})
	echo result
endfunc

See the focus field in the button row.

Don't miss a new vim-quickui release

NewReleases is sending notifications on new releases.