Update maxLine when adding or clearing a collapsed range
Update maxLine when adding or clearing a collapsed range

Closes #1161

adobe/CodeMirror2,nawroth/CodeMirror,bgrins/CodeMirror,DustinH/CodeMirror,ZombieHippie/CodeMirror,pabloferz/CodeMirror,jessegrosjean/CodeMirror,NumbersInternational/CodeMirror,amsul/CodeMirror,mightyguava/CodeMirror,skylarkcob/CodeMirror,adobe/CodeMirror2,SidPresse/CodeMirror,INTELOGIE/CodeMirror,qiankun007/CodeMirror,ejgallego/CodeMirror,alur/CodeMirror,flyskyko/CodeMirror,bgrins/CodeMirror,mihailik/CodeMirror,belph/CodeMirror,codio/CodeMirror,ksanaforge/CodeMirror,increpare/CodeMirror,amsul/CodeMirror,r7kamura/CodeMirror,EasonYi/CodeMirror,angelozerr/CodeMirror,happibum/CodeMirror-main,anthonygego/CodeMirror,skylarkcob/CodeMirror,notepadqq/CodeMirror,ksanaforge/CodeMirror,sgoo/CodeMirror,elisee/CodeMirror,rustemferreira/CodeMirror,kuangyeheng/CodeMirror,jansel/CodeMirror,bocharsky-bw/CodeMirror,michaelerobertsjr/CodeMirror,xeronith/CodeMirror,Carreau/CodeMirror,karthikeyansam/CodeMirror,belph/CodeMirror,ficristo/CodeMirror,d0liver/CodeMirror,vincentwoo/CodeMirror,namin/CodeMirror,grzegorzmazur/CodeMirror,joshterrell805-historic/CodeMirror,davidpham87/CodeMirror,codio/CodeMirror,rasata/CodeMirror,ejgallego/CodeMirror,morrisonwudi/CodeMirror,qweasd1/CodeMirror,TechnicalPursuit/CodeMirror,mtaran-google/CodeMirror,systay/CodeMirror,Dominator008/CodeMirror,sekcheong/CodeMirror,dperetti/CodeMirror,wingify/CodeMirror,d0liver/CodeMirror,amshali/CodeMirror,sekcheong/CodeMirror,xeronith/CodeMirror,crazy4chrissi/CodeMirror,karthikeyansam/CodeMirror,gkoberger/CodeMirror,ejgallego/CodeMirror,kolya-ay/CodeMirror,matthewbauer/CodeMirror,philuchansky/CodeMirror,d0liver/CodeMirror,pabloferz/CodeMirror,GerHobbelt/CodeMirror2,thomasjm/CodeMirror,djadmin/CodeMirror,supriyantomaftuh/CodeMirror,manderson23/CodeMirror,isdampe/CodeMirror,jkaplon/CodeMirror,rasata/CodeMirror,fmoliveira/CodeMirror,sekcheong/CodeMirror,cben/CodeMirror,trumanliu/CodeMirror,NumbersInternational/CodeMirror,rustemferreira/CodeMirror,schanzer/CodeMirror,agendor/CodeMirror,dperetti/CodeMirror,wbinnssmith/CodeMirror,michaelerobertsjr/CodeMirror,jpolitz/CodeMirror,webida/CodeMirror,mightyguava/CodeMirror,hackmdio/CodeMirror,mizchi/CodeMirror,kolya-ay/CodeMirror,NumbersInternational/CodeMirror,hackmdio/CodeMirror,cintiamh/CodeMirror,Dominator008/CodeMirror,jessegrosjean/CodeMirror,wingify/CodeMirror,r7kamura/CodeMirror,Jisuanke/CodeMirror,grzegorzmazur/CodeMirror,rasata/CodeMirror,KamranMackey/CodeMirror,pjkui/CodeMirror,pinbe/CodeMirror,qweasd1/CodeMirror,alur/CodeMirror,bfrohs/CodeMirror,AlanWasTaken/codemirror,tpphu/CodeMirror,loopspace/CodeMirror,thomasjm/CodeMirror,antimatter15/CodeMirror,gkoberger/CodeMirror,sourcelair/CodeMirror,hccampos/CodeMirror,namin/CodeMirror,Allenice/CodeMirror,NeZaMy/CodeMirror2,abdelouahabb/CodeMirror,MarcelGerber/CodeMirror,angelozerr/CodeMirror,abdelouahabb/CodeMirror,melpon/CodeMirror,nightwing/CodeMirror,tpphu/CodeMirror,CartoDB/CodeMirror,mizchi/CodeMirror,antimatter15/CodeMirror,mihailik/CodeMirror,axter/CodeMirror,pinbe/CodeMirror,r7kamura/CodeMirror,buchslava/CodeMirror,vanloswang/CodeMirror,djadmin/CodeMirror,increpare/CodeMirror,supriyantomaftuh/CodeMirror,bluesh55/CodeMirror,qiankun007/CodeMirror,fivetran/CodeMirror,jessegrosjean/CodeMirror,mizchi/CodeMirror,mtaran-google/CodeMirror,MarcelGerber/CodeMirror,axter/CodeMirror,wbinnssmith/CodeMirror,karevn/CodeMirror,EasonYi/CodeMirror,dbarnett/CodeMirror,Icenium/CodeMirror,increpare/CodeMirror,schanzer/CodeMirror,fivetran/CodeMirror,apatawari/CodeMirror,kangkot/CodeMirror,jayaprabhakar/CodeMirror,crazy4chrissi/CodeMirror,trumanliu/CodeMirror,symbla/CodeMirror,Carreau/CodeMirror,kerabromsmu/CodeMirror,kk9599/CodeMirror,sanyaade-iot/CodeMirror,ksanaforge/CodeMirror,jkaplon/CodeMirror,mightyguava/CodeMirror,Icenium/CodeMirror,Jisuanke/CodeMirror,Allenice/CodeMirror,systay/CodeMirror,kangkot/CodeMirror,TechnicalPursuit/CodeMirror,TDaglis/CodeMirror,ThebingServices/CodeMirror,shiren/CodeMirror,trumanliu/CodeMirror,MarcelGerber/CodeMirror,Navaneethsen/CodeMirror,schanzer/CodeMirror,sanyaade-iot/CodeMirror,anthonygego/CodeMirror,fmoliveira/CodeMirror,jayaprabhakar/CodeMirror,melpon/CodeMirror,skylarkcob/CodeMirror,Aliccer/CodeMirror,belph/CodeMirror,isdampe/CodeMirror,elisee/CodeMirror,davidpham87/CodeMirror,davidpham87/CodeMirror,elisee/CodeMirror,ZombieHippie/CodeMirror,anthonygego/CodeMirror,tpphu/CodeMirror,NeZaMy/CodeMirror2,pjkui/CodeMirror,alur/CodeMirror,kangkot/CodeMirror,dudb/CodeMirror,matthewbauer/CodeMirror,codio/CodeMirror,dbarnett/CodeMirror,jochenberger/CodeMirror,AlanWasTaken/codemirror,sanyaade-iot/CodeMirror,sourcelair/CodeMirror,adobe/CodeMirror2,karthikeyansam/CodeMirror,kk9599/CodeMirror,Icenium/CodeMirror,michaelerobertsjr/CodeMirror,INTELOGIE/CodeMirror,DustinH/CodeMirror,ZombieHippie/CodeMirror,InternetGuru/CodeMirror,amireh/codemirror,pinbe/CodeMirror,TechnicalPursuit/CodeMirror,vincentwoo/CodeMirror,buchslava/CodeMirror,manderson23/CodeMirror,Jisuanke/CodeMirror,notepadqq/CodeMirror,sourcelair/CodeMirror,nightwing/CodeMirror,dbarnett/CodeMirror,kerabromsmu/CodeMirror,jochenberger/CodeMirror,camellhf/CodeMirror,nawroth/CodeMirror,symbla/CodeMirror,rrandom/CodeMirror,vincentwoo/CodeMirror,dperetti/CodeMirror,CartoDB/CodeMirror,agendor/CodeMirror,camellhf/CodeMirror,antimatter15/CodeMirror,Ermlab/CodeMirror,crazy4chrissi/CodeMirror,bocharsky-bw/CodeMirror,nawroth/CodeMirror,bfrohs/CodeMirror,kuangyeheng/CodeMirror,thomasjm/CodeMirror,ssxxue/CodeMirror,kevinushey/CodeMirror,morrisonwudi/CodeMirror,bgrins/CodeMirror,mtaran-google/CodeMirror,SidPresse/CodeMirror,KamranMackey/CodeMirror,bluesh55/CodeMirror,Aliccer/CodeMirror,pjkui/CodeMirror,matthewbauer/CodeMirror,NeZaMy/CodeMirror2,morrisonwudi/CodeMirror,jhnesk/CodeMirror,xeronith/CodeMirror,nightwing/CodeMirror,buchslava/CodeMirror,agendor/CodeMirror,rrandom/CodeMirror,TDaglis/CodeMirror,webida/CodeMirror,DustinH/CodeMirror,rustemferreira/CodeMirror,ficristo/CodeMirror,systay/CodeMirror,melpon/CodeMirror,abdelouahabb/CodeMirror,InternetGuru/CodeMirror,amshali/CodeMirror,fpco/codemirror,bocharsky-bw/CodeMirror,loopspace/CodeMirror,apatawari/CodeMirror,karevn/CodeMirror,EasonYi/CodeMirror,philuchansky/CodeMirror,qiankun007/CodeMirror,ssxxue/CodeMirror,mihailik/CodeMirror,Aliccer/CodeMirror,shiren/CodeMirror,symbla/CodeMirror,dudb/CodeMirror,fmoliveira/CodeMirror,joshterrell805-historic/CodeMirror,dudb/CodeMirror,qweasd1/CodeMirror,grzegorzmazur/CodeMirror,TDaglis/CodeMirror,webida/CodeMirror,jpolitz/CodeMirror,happibum/CodeMirror-main,axter/CodeMirror,hccampos/CodeMirror,isdampe/CodeMirror,ashmind/CodeMirror,camellhf/CodeMirror,ashmind/CodeMirror,notepadqq/CodeMirror,SidPresse/CodeMirror,sgoo/CodeMirror,INTELOGIE/CodeMirror,philuchansky/CodeMirror,jhnesk/CodeMirror,ThebingServices/CodeMirror,kevinushey/CodeMirror,jayaprabhakar/CodeMirror,ficristo/CodeMirror,ashmind/CodeMirror,namin/CodeMirror,happibum/CodeMirror-main,AlanWasTaken/codemirror,supriyantomaftuh/CodeMirror,InternetGuru/CodeMirror,gkoberger/CodeMirror,jpolitz/CodeMirror,loopspace/CodeMirror,wingify/CodeMirror,GerHobbelt/CodeMirror2,Navaneethsen/CodeMirror,bluesh55/CodeMirror,KamranMackey/CodeMirror,hccampos/CodeMirror,webida/CodeMirror,Ermlab/CodeMirror,manderson23/CodeMirror,Allenice/CodeMirror,Navaneethsen/CodeMirror,kerabromsmu/CodeMirror,cintiamh/CodeMirror,fpco/codemirror,jkaplon/CodeMirror,bfrohs/CodeMirror,vanloswang/CodeMirror,ssxxue/CodeMirror,vanloswang/CodeMirror,apatawari/CodeMirror,cben/CodeMirror,kuangyeheng/CodeMirror,kk9599/CodeMirror,jansel/CodeMirror,hackmdio/CodeMirror,cintiamh/CodeMirror,pabloferz/CodeMirror,flyskyko/CodeMirror,ThebingServices/CodeMirror,rrandom/CodeMirror,Dominator008/CodeMirror,shiren/CodeMirror,flyskyko/CodeMirror,karevn/CodeMirror,amshali/CodeMirror,djadmin/CodeMirror