Skip to content
Browse files

Add rules to undo ''' completion

  • Loading branch information...
1 parent ac41ad8 commit 883969d0a0a9ebfa6f8d3ac486037a12195eba54 @kana committed Mar 29, 2012
Showing with 20 additions and 0 deletions.
  1. +2 −0 autoload/smartinput.vim
  2. +18 −0 t/api.vim
View
2 autoload/smartinput.vim
@@ -103,6 +103,8 @@ function! smartinput#define_default_rules() "{{{2
\ ])
call urules.add('''''''', [
\ {'at': '''''\%#', 'char': '''', 'input': '''''''''<Left><Left><Left>'},
+ \ {'at': '''''''\%#''''''', 'char': '<BS>', 'input': '<BS><BS><BS><Del><Del><Del>'},
+ \ {'at': '''''''''''''\%#', 'char': '<BS>', 'input': '<BS><BS><BS><BS><BS><BS>'},
\ ])
call urules.add('""', [
\ {'at': '\%#', 'char': '"', 'input': '""<Left>'},
View
18 t/api.vim
@@ -644,6 +644,22 @@ describe 'The default configuration'
\ ["'", [''''''], 1, 3 - 1],
\ ["'", [''''''''''''''], 1, 4 - 1],
\ ],
+ \ ''''''' undo #1': [
+ \ ["'", [''''''], 1, 2 - 1],
+ \ ["'", [''''''], 1, 3 - 1],
+ \ ["'", [''''''''''''''], 1, 4 - 1],
+ \ ["x", ['''''''x'''''''], 1, 5 - 1],
+ \ ["\<BS>", [''''''''''''''], 1, 4 - 1],
+ \ ["\<BS>", [''], 1, 0 + 1],
+ \ ],
+ \ ''''''' undo #2': [
+ \ ["x", ['x'], 1, 2 - 1],
+ \ ["\<C-v>'", ['x'''], 1, 3 - 1],
+ \ ["\<C-v>'", ['x'''''], 1, 4 - 1],
+ \ ["'", ['x'''''''''''''], 1, 5 - 1],
+ \ ["\<End>", ['x'''''''''''''], 1, 8 - 1],
+ \ ["\<BS>", ['x'], 1, 2 - 1],
+ \ ],
\ '() complete': [
\ ["(", ['()'], 1, 2 - 1],
\ ],
@@ -857,6 +873,8 @@ describe 'The default configuration'
\ ''''' undo #1',
\ ''''' undo #2',
\ ''''''' complete',
+ \ ''''''' undo #1',
+ \ ''''''' undo #2',
\ '"" complete',
\ '"" escape',
\ '"" leave #1',

0 comments on commit 883969d

Please sign in to comment.
Something went wrong with that request. Please try again.