Skip to content

Commit 5d510af

Browse files
committed
compile remove with argument -1
1 parent ecde50e commit 5d510af

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
@@ -852,6 +852,8 @@ function s:GoCompiler.compile_call(node)
852852
return printf('viml_%s(*%s)', rlist[0][1:-2], rlist[1])
853853
elseif left =~ 'ExArg'
854854
return printf('&%s{}', left)
855+
elseif left == 'remove' && len(rlist) == 2 && rlist[1] == '-1'
856+
return printf('%s = %s[:len(%s)-1]', rlist[0], rlist[0], rlist[0])
855857
elseif left == 'isvarname' && len(rlist) == 1 && rlist[0] == 'node.value'
856858
return printf('%s(%s.(string))', left, rlist[0])
857859
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)