From 3e325782ded9c0280eb544c6d36f82082b79a7f6 Mon Sep 17 00:00:00 2001 From: Gregor Best Date: Sat, 30 Aug 2008 23:03:36 +0200 Subject: [PATCH] awesomerc: use gmatch instead of deprecated gfind a user in #awesome made me aware of a little quirk in lib/awful.lua which renders the history of the prompt unusable when using Gentoo and installing Lua without the USE-flag "deprecated". Lua states that string.gfind has been replaced with string.gmatch and aborts the function prompt_history_save(id). I attached a patch that replaces id:gfind with id:gmatch, which so far has not revealed any problems. Signed-off-by: Julien Danjou --- lib/awful.lua.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/awful.lua.in b/lib/awful.lua.in index b57f29fbe..a75f88260 100644 --- a/lib/awful.lua.in +++ b/lib/awful.lua.in @@ -881,7 +881,7 @@ local function prompt_history_save(id) local f = io.open(id, "w") if not f then local i = 0 - for d in id:gfind(".-/") do + for d in id:gmatch(".-/") do i = i + #d end mkdir(id:sub(1, i - 1))