[mod] idle detect
This commit is contained in:
parent
e32e3437a1
commit
1787a8e31f
7 changed files with 2016 additions and 1964 deletions
|
|
@ -57,8 +57,8 @@ declare function pos:toPosition($text as xs:string,
|
|||
$index as pos:num
|
||||
)
|
||||
as pos:Position {
|
||||
let $nl:= if($index=>trace("IN ") ge string-length($text)=>trace("L "))
|
||||
then error(xs:QName("pos:range"),"out of range")
|
||||
let $nl:= if($index=>trace("IN ") gt string-length($text)=>trace("L "))
|
||||
then error(xs:QName("pos:range"),`out of range: index={$index},length={string-length($text)}`)
|
||||
else index-of(string-to-codepoints($text),10)
|
||||
let $line:=pos:lineAt($nl,$index)
|
||||
let $off:=if($line eq 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue