fix(awful: hotkeys_popup: insert_keys): handle case when user actually binded some key like `<` or `>` which require xml escape for pango
This commit is contained in:
parent
a35acea61a
commit
6b93661048
|
@ -475,7 +475,7 @@ function widget.new(args)
|
||||||
table.insert(((i<available_height_items) and new_keys or overlap_leftovers), keys[i])
|
table.insert(((i<available_height_items) and new_keys or overlap_leftovers), keys[i])
|
||||||
end
|
end
|
||||||
keys = new_keys
|
keys = new_keys
|
||||||
table.insert(keys, {key=markup.fg(self.modifiers_fg, "▽"), description=""})
|
table.insert(keys, {key="▽", description=""})
|
||||||
end
|
end
|
||||||
if not current_column then
|
if not current_column then
|
||||||
current_column = {layout=wibox.layout.fixed.vertical()}
|
current_column = {layout=wibox.layout.fixed.vertical()}
|
||||||
|
@ -495,13 +495,13 @@ function widget.new(args)
|
||||||
local key_label = ""
|
local key_label = ""
|
||||||
if key.keylist and #key.keylist > 1 then
|
if key.keylist and #key.keylist > 1 then
|
||||||
for each_key_idx, each_key in ipairs(key.keylist) do
|
for each_key_idx, each_key in ipairs(key.keylist) do
|
||||||
key_label = key_label .. each_key
|
key_label = key_label .. gstring.xml_escape(each_key)
|
||||||
if each_key_idx ~= #key.keylist then
|
if each_key_idx ~= #key.keylist then
|
||||||
key_label = key_label .. markup.fg(self.modifiers_fg, '/')
|
key_label = key_label .. markup.fg(self.modifiers_fg, '/')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif key.key then
|
elseif key.key then
|
||||||
key_label = key.key
|
key_label = gstring.xml_escape(key.key)
|
||||||
end
|
end
|
||||||
local rendered_hotkey = markup.font(self.font,
|
local rendered_hotkey = markup.font(self.font,
|
||||||
modifiers .. key_label .. " "
|
modifiers .. key_label .. " "
|
||||||
|
|
Loading…
Reference in New Issue