|
发表于 2021-3-17 13:07:35
|
显示全部楼层
我测试了下。Common.lua中
function Common:FirstWord(line)
local word_pos = editor.LineIndentPosition[line] + 1
--local word_start = editor:WordStartPosition(word_pos) 修改这句
local word_start = word_pos -1
local word_end = editor:WordEndPosition(word_pos)
local word_found = editor:textrange(word_start, word_end)
word_found = word_found:gsub("^%s*", "") -- remove leading white space
word_found = word_found:gsub("[\r\n]", "") -- remove newlines
return string.lower(word_found)
end -- WordAtStart()
修改后不会出现无响应的问题。
|
|