summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2019-06-16 18:36:23 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2019-06-16 18:36:23 +0200
commitd52700284984ada048ce325404dfa25237271ba1 (patch)
treef1008ad1559ecb0f05b086f41a66f0f581309f80
parent15727e7eb005a0eef76941e09d993754b86cb81d (diff)
downloadvim-polyglot-d52700284984ada048ce325404dfa25237271ba1.tar.gz
vim-polyglot-d52700284984ada048ce325404dfa25237271ba1.zip
Updatev3.9.2
Diffstat (limited to '')
-rw-r--r--autoload/jsx_pretty/indent.vim9
-rw-r--r--syntax/gitcommit.vim2
2 files changed, 10 insertions, 1 deletions
diff --git a/autoload/jsx_pretty/indent.vim b/autoload/jsx_pretty/indent.vim
index 9dd0e5b1..d37d3990 100644
--- a/autoload/jsx_pretty/indent.vim
+++ b/autoload/jsx_pretty/indent.vim
@@ -124,6 +124,8 @@ function! jsx_pretty#indent#get(js_indent)
else
return prev_ind
endif
+ elseif prev_line =~ '^\<return'
+ return prev_ind
else
return prev_ind - s:sw()
endif
@@ -188,6 +190,13 @@ function! jsx_pretty#indent#get(js_indent)
else
let ind = a:js_indent()
+ " Issue #68
+ " return (<div>
+ " |<div>)
+ if prev_line =~ '^\<return' && line =~ '^<\s*' . s:end_tag
+ return prev_ind
+ endif
+
" If current syntax is not a jsx syntax group
if s:syn_xmlish(prev_syn_eol) && line !~ '^[)\]}]'
let sol = matchstr(line, s:opfirst)
diff --git a/syntax/gitcommit.vim b/syntax/gitcommit.vim
index 6bf31193..10aa7a1f 100644
--- a/syntax/gitcommit.vim
+++ b/syntax/gitcommit.vim
@@ -22,7 +22,7 @@ endif
syn include @gitcommitDiff syntax/diff.vim
syn region gitcommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|#\)\@=/ fold contains=@gitcommitDiff
-syn match gitcommitSummary ".*\%<50v" contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell
+syn match gitcommitSummary "^.*\%<51v." contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell
syn match gitcommitOverflow ".*" contained contains=@Spell
syn match gitcommitBlank "^[^#].*" contained contains=@Spell