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:
Till
2022-02-23 01:55:55 +01:00
committed by Tomas Klaen
parent f1fd971795
commit b0b5ceb85d
2 changed files with 4 additions and 1 deletions

View File

@@ -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.

View File

@@ -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 = ''