I'm trying to use cecho to reprint a trigger'd word as something else colored using replace. I know I can get this to work with insertText by using selectString to get the column number of the matched word and getLineCount() to get the line number of the match, then using a blank replace (replace("")) to clear the text, move the cursor and reprint with insertText.
however, this doesn't seem to work with cecho. According to the documentation, the third argument to cecho tells cecho to use insertText rather than echo for the printing, but it doesn't seem to register. Even with that argument flipped to true (or false, i tried both) it still prints to the end of the line no matter where you have the cursor currently.
Can we get a fix for this, or at least a check on it, please?
here's the code I'm using:
function creplace(orig,new)
local i = selectString(orig,1)
replace("")
moveCursor("main",i,getLineCount())
cecho(new,nil,nil,true)
end
creplace(matches[1],"<red>testing!!")