summaryrefslogtreecommitdiff
path: root/xmake/modules/private/utils/complete.lua
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2020-01-21 18:04:36 +0800
committerOpportunityLiu <[email protected]>2020-01-21 18:04:36 +0800
commit91e30c6b31122d74ce147467ccbf685255a69f6b (patch)
tree6fb56fcab3e5c965836b50ba67afaa7e8a369ae7 /xmake/modules/private/utils/complete.lua
parent3d8f3777203b84435f85c073a46fcaa8ed02d053 (diff)
try fix complete
Diffstat (limited to 'xmake/modules/private/utils/complete.lua')
-rw-r--r--xmake/modules/private/utils/complete.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/xmake/modules/private/utils/complete.lua b/xmake/modules/private/utils/complete.lua
index 16594088f..d00db751c 100644
--- a/xmake/modules/private/utils/complete.lua
+++ b/xmake/modules/private/utils/complete.lua
@@ -253,14 +253,14 @@ function main(pos, config, ...)
raw_words = {...}
- local is_config = false
if config:find("nospace", 1, true) then
use_spaces = false
- is_config = true
end
if config:find("reenter", 1, true) then
reenter = true
- is_config = true
+ end
+ if config:find("debug", 1, true) then
+ debug = true
end
if not is_config then
@@ -269,6 +269,7 @@ function main(pos, config, ...)
local word = table.concat(raw_words, " ") or ""
position = tonumber(pos) or 0
+
local has_space = word:endswith(" ") or position > #word
word = word:trim()