shawncplus/phpcomplete.vim

Commit 3125c5a will break vim undo

markwu opened this issue · 5 comments

I never know this bug exist, until today.

phpcomplete.vim will break vim undo after commit 3125c5a. Here comes the screencast:

commit 3125c5a - undo break, the last line still there
phpcomplete-3125c5a

commit 388c5f7 (previous commit) - undo works, without any problems
phpcomplete-388c5f7

Here comes my minimal vimrc

set nocompatible
filetype off

execute 'source ~/.vim/bundle/vim-plug/plug.vim'
call plug#begin('~/.vim/bundle/')

Plug 'junegunn/vim-plug'

" Put your bundle below here
Plug 'maralla/completor.vim'
Plug 'shawncplus/phpcomplete.vim'
" Put your bundle above here

call plug#end()

syntax on
filetype plugin indent on

" Put your plugin settings below here
" completor
set completeopt-=preview
set completeopt+=menu,menuone,noinsert,noselect
set shortmess+=c

let g:completor_php_omni_trigger = '([$\w]{2,}|use\s*|->[$\w]*|::[$\w]*|implements\s*|extends\s*|class\s+[$\w]+|new\s*)$'

imap <expr><TAB> pumvisible() ? "\<C-N>" : "\<TAB>"
smap <expr><TAB> pumvisible() ? "\<C-N>" : "\<TAB>"
imap <expr><S-TAB> pumvisible() ? "\<C-P>" : "\<S-TAB>"
smap <expr><S-TAB> pumvisible() ? "\<C-P>" : "\<S-TAB>"
imap <expr><CR> pumvisible() ? "\<C-Y>\<CR>" : "\<CR>"
smap <expr><CR> pumvisible() ? "\<C-Y>\<CR>" : "\<CR>"
"Put your plugin settings above here

My vim is Macvim 8.0.324
OS is OSX 10.11.6

Hmm, this is bad. I'm not sure what to look for though, but i expect that in the last 2 years it would have been noticed... maybe it's related to newer vim versions too.

I've done some more testing, on my home machine, VIM 7.4 + Included patches: 1-989 (linux) I can't seem to reproduce it.

@markwu: I think vim master have a fix for this bug now, please see this patch: vim/vim@d56a79d
I've re-tried this with macvim build 8.0 1-341 and it seems to be fixed for me.

Sorry, a little busy recently.

I just check out the master branch of https://github.com/macvim-dev/macvim , it does not merge this patch yet (It is vim 8.0 patch 329 now), I will test this issue again after macvim merge this patch.

Thanks your information.

I tested this issue with macvim 8.0.363, this bug does not exist anymore. I'll close this issue. Thanks for your help.