Fix #212 indentation behavior
This commit is contained in:
parent
7502b06be0
commit
bc2d1772a2
@ -1,7 +1,7 @@
|
|||||||
"=============================================================================
|
"=============================================================================
|
||||||
" FILE: view.vim
|
" FILE: view.vim
|
||||||
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
|
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
|
||||||
" Last Modified: 20 Jan 2014.
|
" Last Modified: 15 Feb 2014.
|
||||||
" License: MIT license {{{
|
" License: MIT license {{{
|
||||||
" Permission is hereby granted, free of charge, to any person obtaining
|
" Permission is hereby granted, free of charge, to any person obtaining
|
||||||
" a copy of this software and associated documentation files (the
|
" a copy of this software and associated documentation files (the
|
||||||
@ -179,11 +179,8 @@ function! s:indent_snippet(begin, end) "{{{
|
|||||||
try
|
try
|
||||||
setlocal equalprg=
|
setlocal equalprg=
|
||||||
|
|
||||||
" Indent begin line?
|
|
||||||
let begin = (neosnippet.target == '') ? a:begin : a:begin + 1
|
|
||||||
|
|
||||||
let base_indent = matchstr(getline(a:begin), '^\s\+')
|
let base_indent = matchstr(getline(a:begin), '^\s\+')
|
||||||
for line_nr in range(begin, a:end)
|
for line_nr in range(a:begin + 1, a:end)
|
||||||
call cursor(line_nr, 0)
|
call cursor(line_nr, 0)
|
||||||
|
|
||||||
if getline('.') =~ '^\t\+'
|
if getline('.') =~ '^\t\+'
|
||||||
|
Loading…
Reference in New Issue
Block a user