Skip to content

Commit 7ae2b17

Browse files
committed
clean up the test code
1 parent 7b2fa35 commit 7ae2b17

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

test/node_position/test_position.vim

+1-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ function! s:run()
2222
let toplevel = p.parse(r)
2323
let func = toplevel.body[0]
2424
let body = s:extract_body(func, src)
25-
echom string(split(body, "\n"))
2625
call writefile(split(body, "\n"), 'test/node_position/test_position.out')
2726
qall!
2827
endfunction
@@ -35,8 +34,7 @@ function! s:extract_body(func, src)
3534

3635
let endpos = a:func.endfunction.pos
3736
let endfunc = a:func.endfunction.ea
38-
let cmdlen = endfunc.argpos.i - endfunc.cmdpos.i
39-
let endpos.i += cmdlen
37+
let cmdlen = endfunc.argpos.offset - endfunc.cmdpos.offset
4038
let endpos.offset += cmdlen
4139

4240
return join(a:src, "\n")[pos.offset : endpos.offset]

0 commit comments

Comments
 (0)