From bc2d1772a21b64a209980915a6f93f42b30d05cb Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Sat, 15 Feb 2014 11:00:28 +0900 Subject: [PATCH] Fix #212 indentation behavior --- autoload/neosnippet/view.vim | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/autoload/neosnippet/view.vim b/autoload/neosnippet/view.vim index c8f77c6..7c1b1d9 100644 --- a/autoload/neosnippet/view.vim +++ b/autoload/neosnippet/view.vim @@ -1,7 +1,7 @@ "============================================================================= " FILE: view.vim " AUTHOR: Shougo Matsushita -" Last Modified: 20 Jan 2014. +" Last Modified: 15 Feb 2014. " License: MIT license {{{ " Permission is hereby granted, free of charge, to any person obtaining " a copy of this software and associated documentation files (the @@ -179,11 +179,8 @@ function! s:indent_snippet(begin, end) "{{{ try setlocal equalprg= - " Indent begin line? - let begin = (neosnippet.target == '') ? a:begin : a:begin + 1 - 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) if getline('.') =~ '^\t\+'