summaryrefslogtreecommitdiffstats
path: root/kate/scripts/script-indent-c1-test.lua
diff options
context:
space:
mode:
Diffstat (limited to 'kate/scripts/script-indent-c1-test.lua')
-rw-r--r--kate/scripts/script-indent-c1-test.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/kate/scripts/script-indent-c1-test.lua b/kate/scripts/script-indent-c1-test.lua
index c54f20424..d2593b962 100644
--- a/kate/scripts/script-indent-c1-test.lua
+++ b/kate/scripts/script-indent-c1-test.lua
@@ -15,12 +15,12 @@ function indentChar(c)
-- unindent } and {, if not in a comment
- if not(string.tqfind(textLine,"^%s*//")) then
+ if not(string.find(textLine,"^%s*//")) then
katedebug("no comment")
katedebug(c);
if (c=="}") or (c=="{") then
katedebug("} or { found");
- if (string.tqfind(textLine,"^%s%s%s%s")) then
+ if (string.find(textLine,"^%s%s%s%s")) then
katedebug("removing one indentation level");
document.removeText(line,0,line,tabWidth)
view.setCursorPositionReal(line,col-tabWidth)
@@ -60,7 +60,7 @@ function indentNewLine()
function firstNonSpace( text )
- local pos=string.tqfind(text,"[^%s]")
+ local pos=string.find(text,"[^%s]")
if pos then
return pos
else
@@ -69,7 +69,7 @@ function indentNewLine()
end
function lastNonSpace (text)
- local pos=string.tqfind(text,"[^%s]%s*$")
+ local pos=string.find(text,"[^%s]%s*$")
if pos then
return pos
else
@@ -88,7 +88,7 @@ function indentNewLine()
strCurrentLine=document.textLine(intCurrentLine)
intLastChar= lastNonSpace(strCurrentLine)
intFirstChar=firstNonSpace(strCurrentLine)
- if not (string.tqfind(strCurrentLine,"//")) then
+ if not (string.find(strCurrentLine,"//")) then
for intCurrentChar=intLastChar,intFirstChar,-1 do
ch=string.sub(strCurrentLine,intCurrentChar,intCurrentChar)
if (ch=="(") or (ch=="[") then
@@ -122,7 +122,7 @@ function indentNewLine()
katedebug( "line: " .. intCurrentLine)
katedebug( openParenCount .. ", " .. openBraceCount)
- local ok,match=pcall(function () return string.sub(strCurrentLine,string.tqfind(strCurrentLine,"^%s+")) end)
+ local ok,match=pcall(function () return string.sub(strCurrentLine,string.find(strCurrentLine,"^%s+")) end)
if ok then
katedebug("Line HAD leading whitespaces")
strIndentFiller=match