From d331b9049d66b9aa8836023c0329d25c1b6a9c09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Thu, 7 Apr 2016 21:16:19 +0200 Subject: [PATCH] Fixed #427 - minor error in delimiters --- autoload/vimtex/delim.vim | 2 +- test/vader/delims.vader | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 test/vader/delims.vader diff --git a/autoload/vimtex/delim.vim b/autoload/vimtex/delim.vim index e45d499..d495ef4 100644 --- a/autoload/vimtex/delim.vim +++ b/autoload/vimtex/delim.vim @@ -264,7 +264,7 @@ function! vimtex#delim#toggle_modifier(...) " {{{1 \ : vimtex#delim#get_surrounding('delim_math') if empty(l:open) | return | endif - let newmods = [] + let newmods = ['', ''] let modlist = [['', '']] + g:vimtex_delim_toggle_mod_list let n = len(modlist) for i in range(n) diff --git a/test/vader/delims.vader b/test/vader/delims.vader new file mode 100644 index 0000000..b7f8125 --- /dev/null +++ b/test/vader/delims.vader @@ -0,0 +1,15 @@ +Given tex (Some complicated delimited math): + $\bigl(\begin{smallmatrix} + \Q^* & \\ + & 1 \\ + \end{smallmatrix}\bigr)$ + +Do (Toggle math delimiters): + 3jtsd + +Expect tex (Toggled math delimiters): + $(\begin{smallmatrix} + \Q^* & \\ + & 1 \\ + \end{smallmatrix})$ +