Fix crash on undo. If undoing deletes some characters(or line) the size of document decrease and setSelectedRange may select the bigger position than the length of the document. This cause a crash.
Fix crash on undo.
If undoing deletes some characters(or line) the size of document
decrease and setSelectedRange may select the bigger position than the
length of the document. This cause a crash.

brucehappy/XVim,gecko655/XVim,XVimProject/XVim,otfsenter/XVim,xuebuhui52011/XVim,EmuxEvans/XVim,scottsievert/XVim,weizhenwei/XVim,antmd/XVim,brucehappy/XVim,antmd/XVim1,weizhenwei/XVim,tkuichooseyou/XVim,antmd/XVim,pebble8888/XVim,antmd/XVim,kgoodier/XVim,teemobean/XVim,squarefrog/XVim,XVimProject/XVim,liwangwang123/XVim,tanxxjun321/XVim,ishkawa/XVim,N4tr0n/XVim,pebble8888/XVim,EmuxEvans/XVim,otfsenter/XVim,dengcqw/XVim_x,squarefrog/XVim,thatchristoph/XVim,N4tr0n/XVim,brucehappy/XVim,scottsievert/XVim,kgoodier/XVim,antmd/XVim,ishkawa/XVim,hmuronaka/XVim,N4tr0n/XVim,EmuxEvans/XVim,kgoodier/XVim,raimon49/XVim,yixiang/XVim,dengcqw/XVim_x,hyperspacemark/XVim,tanxxjun321/XVim,liwangwang123/XVim,SampleLiao/XVim,hyperspacemark/XVim,liwangwang123/XVim,thatchristoph/XVim,lisuxia1992/XVim,tonyd256/XVim,tonyd256/XVim,dengcqw/XVim_x,teemobean/XVim,lisuxia1992/XVim,gecko655/XVim,otfsenter/XVim,scottsievert/XVim,Chenkaiang/XVim,tkuichooseyou/XVim,thatchristoph/XVim,weizhenwei/XVim,XVimProject/XVim,sunzeboy/XVim,rokemoon/XVim,raimon49/XVim,hyperspacemark/XVim,tkuichooseyou/XVim,yixiang/XVim,xuebuhui52011/XVim,gecko655/XVim,xuebuhui52011/XVim,pebble8888/XVim,takeshineshiro/XVim,squarefrog/XVim,tonyd256/XVim,lisuxia1992/XVim,yixiang/XVim,hmuronaka/XVim,Chenkaiang/XVim,N4tr0n/XVim,hmuronaka/XVim,weizhenwei/XVim,XVimProject/XVim,SampleLiao/XVim,hyperspacemark/XVim,kgoodier/XVim,sunzeboy/XVim,raimon49/XVim,tonyd256/XVim,Chenkaiang/XVim,takeshineshiro/XVim,Chenkaiang/XVim,yixiang/XVim,tanxxjun321/XVim,tkuichooseyou/XVim,otfsenter/XVim,pebble8888/XVim,rokemoon/XVim,ishkawa/XVim,EmuxEvans/XVim,lisuxia1992/XVim,SampleLiao/XVim,SampleLiao/XVim,squarefrog/XVim,takeshineshiro/XVim,raimon49/XVim,xuebuhui52011/XVim,ishkawa/XVim,antmd/XVim1,sunzeboy/XVim,teemobean/XVim,hmuronaka/XVim,brucehappy/XVim,tanxxjun321/XVim,liwangwang123/XVim,dengcqw/XVim_x,teemobean/XVim,sunzeboy/XVim,thatchristoph/XVim,scottsievert/XVim,gecko655/XVim,antmd/XVim1