Permalink
Browse files

Fix conflict with cindent. Comment on #95.

  • Loading branch information...
1 parent 93d4a37 commit ad4430706e6d7a738da6f45881dad08d7edaea8f @Raimondi committed Apr 1, 2012
Showing with 13 additions and 2 deletions.
  1. +1 −2 autoload/delimitMate.vim
  2. +12 −0 test/expand_cr.txt
View
@@ -354,8 +354,7 @@ function! delimitMate#JumpOut(char) "{{{
return ' '.a:char.delimitMate#Del().delimitMate#Del()
elseif jump == 5
call delimitMate#FlushBuffer()
- return "\<CR>" . matchstr(getline(line('.') + 1), '^\s*\S')
- \ . delimitMate#Del() . "\<Del>"
+ return "\<C-O>:exec \"normal! \\<CR>a\"\<CR>"
else
return a:char
endif
View
@@ -30,3 +30,15 @@ exec "normal i( \<CR>\<BS>\<BS>x"
================================================================================
(x)
--------------------------------------------------------------------------------
+# Conflict with indentation settings (cindent). Issue #95
+se cindent
+call setline(1, ['sub foo {',' while (1) {', ' ', ' }', '}'])
+call cursor(3, 8)
+normal a}x
+================================================================================
+sub foo {
+ while (1) {
+
+ }x
+}
+--------------------------------------------------------------------------------

0 comments on commit ad44307

Please sign in to comment.