summaryrefslogtreecommitdiffstats
path: root/indent/crystal.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-04-25 21:03:34 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-04-25 21:03:34 +0200
commit68b2748af117b56208f25678c4b465af00dc64c5 (patch)
treef9038064b78513b3f99edb574cdd2943bd2fd633 /indent/crystal.vim
parent14dc82fc4e6c0c08078f97a24a6c1639c1cc5113 (diff)
downloadvim-polyglot-68b2748af117b56208f25678c4b465af00dc64c5.tar.gz
vim-polyglot-68b2748af117b56208f25678c4b465af00dc64c5.zip
Update
Diffstat (limited to '')
-rw-r--r--indent/crystal.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/indent/crystal.vim b/indent/crystal.vim
index 66eeef42..96cdd586 100644
--- a/indent/crystal.vim
+++ b/indent/crystal.vim
@@ -42,7 +42,7 @@ function GetCrystalIndent(...)
let clnum = a:0 ? a:1 : v:lnum
" Set up variables for restoring position in file
- let vcol = col(clnum)
+ let vcol = col('.')
" Work on the current line {{{2
" ------------------------
@@ -170,7 +170,7 @@ function GetCrystalIndent(...)
"
" If it contained hanging closing brackets, find the rightmost one, find its
" match and indent according to that.
- if line =~# '[[({]' || line =~# '[])}]\s*\%(#.*\)\=$'
+ if line =~# '[[({]' || line =~# '[])]\s*\%(#.*\)\=$'
let [opening, closing] = crystal#indent#ExtraBrackets(lnum)
if opening.pos != -1
@@ -186,7 +186,7 @@ function GetCrystalIndent(...)
endif
elseif closing.pos != -1
call cursor(lnum, closing.pos + 1)
- normal! %
+ keepjumps normal! %
if crystal#indent#Match(line('.'), g:crystal#indent#crystal_indent_keywords)
return indent('.') + s:sw()