awful.completion.shell: fix cur_pos return value

This commit is contained in:
Daniel Hahler 2017-04-18 00:05:33 +02:00
parent a6c36a4a2e
commit 956ac3c50d
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ function completion.shell(command, cur_pos, ncomp, shell)
end end
local str = command:sub(1, cword_start - 1) .. output[ncomp] .. command:sub(cword_end) local str = command:sub(1, cword_start - 1) .. output[ncomp] .. command:sub(cword_end)
cur_pos = cword_end + #output[ncomp] + 1 cur_pos = cword_start + #output[ncomp]
return str, cur_pos, output return str, cur_pos, output
end end