Skip to content

Commit 90bc36f

Browse files
committed
feat: (200) Don't block the use of user defined text objects
Ported: tpope#200
1 parent 5eaff40 commit 90bc36f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

import/surround.vim

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ export def DoSurround(value: string = null_string, new_value: string = null_stri
535535
elseif char ==# 'f'
536536
execute "normal! \<Plug>(surround-d)i(" .. char
537537
else
538-
execute "normal! \<Plug>(surround-d)" .. strcount .. 'i' .. char
538+
execute "normal \<Plug>(surround-d)" .. strcount .. 'i' .. char
539539
endif
540540

541541
var keeper = getreg('"')
@@ -586,7 +586,7 @@ export def DoSurround(value: string = null_string, new_value: string = null_stri
586586
execute 'normal! b\<Plug>(surround-d)w'
587587
original = getreg('"')
588588
else
589-
execute "normal! \<Plug>(surround-d)a" .. char
589+
execute "normal \<Plug>(surround-d)a" .. char
590590
endif
591591
endif
592592

@@ -689,11 +689,11 @@ export def OpFunc(atype: string, linebreak: bool = false): string
689689
var reg_type = reg->getregtype()
690690
var type = atype
691691

692-
if atype == "char"
693-
silent execute 'normal! v`[o`]"' .. reg .. 'y'
692+
if atype == 'char'
693+
silent execute 'normal v`[o`]"' .. reg .. 'y'
694694
type = 'v'
695-
elseif atype == "line"
696-
silent execute 'normal! `[V`]"' .. reg .. 'y'
695+
elseif atype == 'line'
696+
silent execute 'normal `[V`]"' .. reg .. 'y'
697697
type = 'V'
698698
elseif atype ==# "v" || atype ==# "V" || atype ==# "\<C-V>"
699699
&selection = sel_save

0 commit comments

Comments
 (0)