cmd_bar: Fix regression with invalid modes
This is another regression from #4014: multiple arrows in a row mean optional values. Re-introduce new states to force matching & proper parser errors.
This commit is contained in:
parent
9eb2458b55
commit
fb2677f5f4
@ -454,23 +454,27 @@ state TITLE_FORMAT:
|
||||
|
||||
# bar (hidden_state hide|show|toggle)|(mode dock|hide|invisible|toggle) [<bar_id>]
|
||||
state BAR:
|
||||
bar_type = 'hidden_state'
|
||||
'hidden_state'
|
||||
-> BAR_HIDDEN_STATE
|
||||
bar_type = 'mode'
|
||||
'mode'
|
||||
-> BAR_MODE
|
||||
|
||||
state BAR_HIDDEN_STATE:
|
||||
bar_hidden_state = 'hide', 'show', 'toggle'
|
||||
->
|
||||
bar_id = word
|
||||
->
|
||||
end
|
||||
-> call cmd_bar_hidden_state($bar_hidden_state, $bar_id)
|
||||
bar_value = 'hide', 'show', 'toggle'
|
||||
-> BAR_HIDDEN_STATE_ID
|
||||
|
||||
state BAR_MODE:
|
||||
bar_value = 'dock', 'hide', 'invisible', 'toggle'
|
||||
->
|
||||
state BAR_HIDDEN_STATE_ID:
|
||||
bar_id = word
|
||||
->
|
||||
end
|
||||
-> call cmd_bar_mode($bar_value, $bar_id)
|
||||
|
||||
state BAR_MODE:
|
||||
bar_value = 'dock', 'hide', 'invisible', 'toggle'
|
||||
-> BAR_MODE_ID
|
||||
|
||||
state BAR_MODE_ID:
|
||||
bar_id = word
|
||||
->
|
||||
end
|
||||
-> call cmd_bar_hidden_state($bar_value, $bar_id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user