Also allow '#menu:' as keyword instead of '#!' in input.conf
Apparently lua patterns don't have syntax which does (#!|#menu:), so it is split with the if statement
This commit is contained in:
@@ -379,7 +379,7 @@ Adding items to menu is facilitated by commenting your keybinds in `input.conf`
|
||||
|
||||
Comment has to be at the end of the line with the binding.
|
||||
|
||||
Comment has to start with `#!`.
|
||||
Comment has to start with `#!` (or `#menu:`).
|
||||
|
||||
Text after `#!` is an item title.
|
||||
|
||||
|
3
uosc.lua
3
uosc.lua
@@ -2825,6 +2825,9 @@ state.context_menu_items = (function()
|
||||
|
||||
for line in io.lines(input_conf_path) do
|
||||
local key, command, title = string.match(line, '%s*([%S]+)%s+(.*)%s#!%s*(.*)')
|
||||
if not key then
|
||||
key, command, title = string.match(line, '%s*([%S]+)%s+(.*)%s#menu:%s*(.*)')
|
||||
end
|
||||
if key then
|
||||
local is_dummy = key:sub(1, 1) == '#'
|
||||
local submenu_id = ''
|
||||
|
Reference in New Issue
Block a user