Skip to content

Commit 2790bf6

Browse files
committed
compile remove with argument -1
1 parent 133692e commit 2790bf6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

go/gocompiler.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,8 @@ function s:GoCompiler.compile_call(node)
855855
return printf('viml_%s(*%s)', rlist[0][1:-2], rlist[1])
856856
elseif left =~ 'ExArg'
857857
return printf('&%s{}', left)
858+
elseif left == 'remove' && len(rlist) == 2 && rlist[1] == '-1'
859+
return printf('%s = %s[:len(%s)-1]', rlist[0], rlist[0], rlist[0])
858860
elseif left == 'isvarname' && len(rlist) == 1 && rlist[0] == 'node.value'
859861
return printf('%s(%s.(string))', left, rlist[0])
860862
elseif left == 'islower' && len(rlist) == 1 && rlist[0] == 'key[0]'

go/vimlparser.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)