fix b->b2<BS> case, fix merge
This commit is contained in:
parent
14ea90385b
commit
6c4fb6f3f2
@ -46,6 +46,12 @@ command! -bang -nargs=? -complete=customlist,UltiSnips#FileTypeComplete UltiSnip
|
||||
|
||||
command! -nargs=1 UltiSnipsAddFiletypes :call UltiSnips#AddFiletypes(<q-args>)
|
||||
|
||||
augroup UltiSnips_AutoTrigger
|
||||
au!
|
||||
au InsertCharPre * call UltiSnips#TrackChange()
|
||||
au TextChangedI * call UltiSnips#TrackChange()
|
||||
augroup END
|
||||
|
||||
call UltiSnips#map_keys#MapKeys()
|
||||
|
||||
" vim: ts=8 sts=4 sw=4
|
||||
|
@ -365,8 +365,6 @@ class SnippetManager(object):
|
||||
_vim.command('autocmd!')
|
||||
_vim.command('autocmd CursorMovedI * call UltiSnips#CursorMoved()')
|
||||
_vim.command('autocmd CursorMoved * call UltiSnips#CursorMoved()')
|
||||
_vim.command('autocmd InsertCharPre * call UltiSnips#TrackChange()')
|
||||
_vim.command('autocmd TextChangedI * call UltiSnips#TrackChange()')
|
||||
|
||||
_vim.command(
|
||||
'autocmd InsertLeave * call UltiSnips#LeavingInsertMode()')
|
||||
@ -779,11 +777,12 @@ class SnippetManager(object):
|
||||
@err_to_scratch_buffer
|
||||
def _track_change(self):
|
||||
inserted_char = _vim.eval('v:char')
|
||||
try:
|
||||
if inserted_char == '':
|
||||
before = _vim.buf.line_till_cursor
|
||||
if before and before[-1] == self._last_inserted_char:
|
||||
self._try_expand(autotrigger_only=True)
|
||||
else:
|
||||
finally:
|
||||
self._last_inserted_char = inserted_char
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user