Ensure cursor doesn't end up outside of visible window
Ensure cursor doesn't end up outside of visible window

Closes #738

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