Skip to content

Commit

Permalink
Update index.imba
Browse files Browse the repository at this point in the history
  • Loading branch information
somebee committed Feb 29, 2024
1 parent 5627ce5 commit 19cc29f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/typescript-imba-service/test/index.imba
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def run
def findPos file, pos
if typeof pos == 'string'
let off = pos.indexOf('~')
let index = file.content.indexOf(pos.replace('~',''))
let index = file..content..indexOf(pos.replace('~',''))

pos = pos.replace(/\#\s.*/,'')
pos = index + (off >= 0 ? off : Math.floor(pos.length * 0.5))
return pos
Expand Down Expand Up @@ -66,7 +67,7 @@ def run
o.triggerCharacter ??= ''
file = findFile(file)
let inpos = pos
let src = file.fileName or file
let src = file..fileName or file
pos = findPos(file,pos)
let ctx = file.doc.getContextAtOffset(pos)
# let res = x.ls.getQuickInfoAtPosition(src,pos)
Expand Down

0 comments on commit 19cc29f

Please sign in to comment.