Skip to content

Commit

Permalink
Merge pull request #433 from liquidz/bugfix/ignorecase
Browse files Browse the repository at this point in the history
Fix to ignore case on detecting namespace
  • Loading branch information
liquidz authored Aug 19, 2022
2 parents 8ae2ee8 + c989387 commit eaf6536
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/iced/nrepl/ns.vim
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function! iced#nrepl#ns#name_by_buf() abort
call sexp#move_to_adjacent_element('n', 0, 1, 0, 0)
endif

return matchstr(getline('.'), '[a-z0-9.\-]\+', col('.') - 1)
return matchstr(getline('.'), '[a-zA-Z0-9.\-]\+', col('.') - 1)
finally
let @@ = reg_save
call winrestview(view)
Expand Down
6 changes: 6 additions & 0 deletions test/nrepl_ns.vim
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ function! s:suite.name_by_buf_in_ns_test() abort
call s:buf.stop_dummy()
endfunction

function! s:suite.name_by_buf_camel_case_test() abort
call s:buf.start_dummy(['(ns fooBar.core)', '|'])
call s:assert.equals(iced#nrepl#ns#name_by_buf(), 'fooBar.core')
call s:buf.stop_dummy()
endfunction

function! s:suite.name_test() abort
call s:ch.mock({
\ 'status_value': 'open',
Expand Down

0 comments on commit eaf6536

Please sign in to comment.