Skip to content

Commit

Permalink
Limit search for snippet key only to current line
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorengarenar committed Nov 9, 2023
1 parent 16d1d67 commit 11bc4fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autoload/miniSnip.vim
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ function! s:insertSnippet() abort

" Delete snippet key
let snippet += [ strpart(getline('.'), col('.')) ] " save part after snippet
exec 'norm! l?'. s:getVar("exppat") ."\<CR>" . '"_D' | call histdel('/', -1)
exec 'norm! l?\%'. line('.').'l' . s:getVar("exppat") ."\<CR>" . '"_D'
call histdel('/', -1)

" Get XY position of beginning of the snippet
let s:SNIP.pos.start_xy = getpos('.')
Expand Down

0 comments on commit 11bc4fd

Please sign in to comment.