Skip to content

Commit e5d0b57

Browse files
committed
Set 'notildeop' before preserving the case of the small camel
When 'tildeop' is set the command `normal! l~` doesn't work. So back up the option, set `notildeop`, and restore it afterwards.
1 parent 1af9cde commit e5d0b57

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

autoload/textobj/variable_segment.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ function! s:select_a()
3838
if start_column - 2 <= word_start ||
3939
\ getline(start_line)[:start_column - 2] =~# '^_*$'
4040
call setpos('.', end_position)
41+
let l:tildeop = &tildeop
42+
set notildeop
4143
normal! l~
44+
let &tildeop = l:tildeop
4245
endif
4346
endif
4447

0 commit comments

Comments
 (0)