In my source I have only one action. But having only one element in actions and act_descriptions arrays does not execute the action for me when candidate selected. To work around this I had to duplicate the elements. Maybe I misunderstand something?
function zaw-src-mywidget() {
candidates=('HELLO' 'WORLD')
actions=(zaw-src-mycall zaw-src-mycall) # <-- dublicates
act_descriptions=("description" "description") # <-- dublicates
}
function zaw-src-mycall() {
LBUFFER="choice was $1"
}
zaw-register-src -n mywidget zaw-src-mywidget
In my source I have only one action. But having only one element in
actions
andact_descriptions
arrays does not execute the action for me when candidate selected. To work around this I had to duplicate the elements. Maybe I misunderstand something?