Fix Vim section movements for standard Rust style.
Fix Vim section movements for standard Rust style.

(Expressed another way: make `[[` et al. work with the curly brace at
the end of a line as is standard Rust style, not just at the start is it
is by default in Vim, from K&R style.)

This came out of #11492, where a simpler but less effective technique
was initially proposed; some discussion of the techniques, ways and
means can be found there.

There are still a few caveats:

- Operator-pending mode behaves differently to the standard behaviour:
  if inside curly braces, it should delete up to and including the
  closing of the outermost curly brace (that doesn't seem to me
  consistent with documented behaviour, but it's what it does). Actual
  behaviour (the more logical and consistent, in my opinion): up to the
  start of the next outermost curly brace.

- With folding enabled (`set fdm=syntax`), `[[` and `]]` do not behave
  as they should: the default behaviour treats an entire closed fold as
  one line for these purposes while this code does not (I explicitly
  `set nofoldenable` in the function—the side-effects are worse with
  folds enabled), leading to unexpected behaviour, the worst of which is
  `[[` and/or `]]` not working in visual mode on a closed fold (visual
  mode keeps it at the extreme end of the region line of the folded
  region, so it's always going back to the opening line of that fold and
  immediately being shoved back to the end by visual mode).

- `[[` and `]]` are operating inside comments, whereas the standard
  behaviour skips comments.

- The viewport position is sometimes changed when it should not be
  necessary.

mdinger/rust,barosl/rust,pythonesque/rust,bluss/rand,rohitjoshi/rust,GBGamer/rust,hauleth/rust,stepancheg/rust-ide-rust,aturon/rust,michaelballantyne/rust-gpu,servo/rust,erickt/rust,aepsil0n/rust,P1start/rust,ktossell/rust,avdi/rust,barosl/rust,avdi/rust,pelmers/rust,zachwick/rust,graydon/rust,nwin/rust,pczarn/rust,aturon/rust,robertg/rust,carols10cents/rust,hauleth/rust,pshc/rust,bhickey/rand,jashank/rust,Ryman/rust,pythonesque/rust,pelmers/rust,nwin/rust,0x73/rust,zubron/rust,omasanori/rust,jashank/rust,AerialX/rust,seanrivera/rust,michaelballantyne/rust-gpu,KokaKiwi/rust,kwantam/rust,mihneadb/rust,pelmers/rust,carols10cents/rust,cllns/rust,vhbit/rust,victorvde/rust,0x73/rust,robertg/rust,miniupnp/rust,sae-bom/rust,zubron/rust,arthurprs/rand,untitaker/rust,omasanori/rust,XMPPwocky/rust,dinfuehr/rust,l0kod/rust,bombless/rust,zachwick/rust,pshc/rust,zachwick/rust,aneeshusa/rust,graydon/rust,jbclements/rust,0x73/rust,emk/rust,aturon/rust,XMPPwocky/rust,barosl/rust,richo/rust,reem/rust,mahkoh/rust,barosl/rust,jashank/rust,ejjeong/rust,avdi/rust,P1start/rust,ebfull/rust,miniupnp/rust,GBGamer/rust,mdinger/rust,rprichard/rust,TheNeikos/rust,pczarn/rust,nham/rust,servo/rust,AerialX/rust,untitaker/rust,0x73/rust,untitaker/rust,Ryman/rust,achanda/rand,aturon/rust,richo/rust,ebfull/rust,robertg/rust,XMPPwocky/rust,pshc/rust,pelmers/rust,andars/rust,cllns/rust,robertg/rust,shepmaster/rand,jashank/rust,andars/rust,KokaKiwi/rust,victorvde/rust,erickt/rust,P1start/rust,nwin/rust,nwin/rust,aturon/rust,pythonesque/rust,GBGamer/rust,jbclements/rust,GBGamer/rust,jbclements/rust,aidancully/rust,kwantam/rust,retep998/rand,AerialX/rust,emk/rust,seanrivera/rust,philyoon/rust,victorvde/rust,seanrivera/rust,pczarn/rust,reem/rust,krzysz00/rust,dwillmer/rust,aepsil0n/rust,ktossell/rust,dinfuehr/rust,pythonesque/rust,ejjeong/rust,zachwick/rust,AerialX/rust-rt-minimal,nham/rust,pczarn/rust,graydon/rust,0x73/rust,philyoon/rust,miniupnp/rust,hauleth/rust,ruud-v-a/rust,omasanori/rust,rohitjoshi/rust,kimroen/rust,ebfull/rust,emk/rust,jbclements/rust,michaelballantyne/rust-gpu,mdinger/rust,jroesch/rust,krzysz00/rust,philyoon/rust,quornian/rust,miniupnp/rust,emk/rust,reem/rust,zaeleus/rust,nham/rust,andars/rust,nwin/rust,krzysz00/rust,mvdnes/rust,AerialX/rust-rt-minimal,kimroen/rust,vhbit/rust,pythonesque/rust,stepancheg/rust-ide-rust,mahkoh/rust,jbclements/rust,aepsil0n/rust,quornian/rust,bombless/rust,jroesch/rust,jbclements/rust,zaeleus/rust,ruud-v-a/rust,defuz/rust,reem/rust,kwantam/rust,servo/rust,carols10cents/rust,GrahamDennis/rand,aneeshusa/rust,kwantam/rust,richo/rust,vhbit/rust,ruud-v-a/rust,jashank/rust,quornian/rust,0x73/rust,carols10cents/rust,l0kod/rust,ejjeong/rust,victorvde/rust,carols10cents/rust,dwillmer/rust,kwantam/rust,dwillmer/rust,barosl/rust,GBGamer/rust,jroesch/rust,GBGamer/rust,mvdnes/rust,stepancheg/rust-ide-rust,zubron/rust,rprichard/rust,michaelballantyne/rust-gpu,victorvde/rust,reem/rust,ejjeong/rust,XMPPwocky/rust,defuz/rust,mihneadb/rust,jbclements/rust,pczarn/rust,gifnksm/rust,zaeleus/rust,aneeshusa/rust,vhbit/rust,jbclements/rust,omasanori/rust,zubron/rust,ejjeong/rust,robertg/rust,Ryman/rust,kimroen/rust,avdi/rust,mahkoh/rust,jbclements/rust,servo/rust,jroesch/rust,miniupnp/rust,bombless/rust,AerialX/rust,GBGamer/rust,pelmers/rust,kwantam/rust,rohitjoshi/rust,avdi/rust,omasanori/rust,jroesch/rust,sae-bom/rust,aneeshusa/rust,AerialX/rust-rt-minimal,carols10cents/rust,mdinger/rust,ebfull/rust,ebfull/rust,sae-bom/rust,l0kod/rust,quornian/rust,pshc/rust,Ryman/rust,emk/rust,ktossell/rust,P1start/rust,zubron/rust,KokaKiwi/rust,servo/rust,pythonesque/rust,vhbit/rust,dwillmer/rust,jroesch/rust,pelmers/rust,P1start/rust,mvdnes/rust,aidancully/rust,nham/rust,nham/rust,michaelballantyne/rust-gpu,Ryman/rust,aidancully/rust,l0kod/rust,ktossell/rust,jroesch/rust,pczarn/rust,zaeleus/rust,krzysz00/rust,P1start/rust,seanrivera/rust,pczarn/rust,jashank/rust,philyoon/rust,erickt/rust,aepsil0n/rust,cllns/rust,nham/rust,untitaker/rust,zubron/rust,servo/rust,l0kod/rust,aneeshusa/rust,kimroen/rust,pshc/rust,mvdnes/rust,zubron/rust,miniupnp/rust,kimroen/rust,bombless/rust,seanrivera/rust,stepancheg/rust-ide-rust,defuz/rust,stepancheg/rust-ide-rust,erickt/rust,pythonesque/rust,zaeleus/rust,AerialX/rust,quornian/rust,robertg/rust,KokaKiwi/rust,michaelballantyne/rust-gpu,jashank/rust,mihneadb/rust,ebfull/rand,sae-bom/rust,miniupnp/rust,philyoon/rust,Ryman/rust,zubron/rust,erickt/rust,barosl/rust,aneeshusa/rust,zachwick/rust,TheNeikos/rust,sae-bom/rust,mihneadb/rust,ebfull/rust,richo/rust,nwin/rust,hauleth/rust,Ryman/rust,gifnksm/rust,vhbit/rust,TheNeikos/rust,sae-bom/rust,reem/rust,dinfuehr/rust,TheNeikos/rust,mvdnes/rust,servo/rust,aturon/rust,dinfuehr/rust,rohitjoshi/rust,dwillmer/rust,kimroen/rust,l0kod/rust,avdi/rust,vhbit/rust,aturon/rust,zaeleus/rust,TheNeikos/rust,pshc/rust,AerialX/rust-rt-minimal,graydon/rust,aidancully/rust,pshc/rust,waynenilsen/rand,cllns/rust,krzysz00/rust,aepsil0n/rust,gifnksm/rust,P1start/rust,quornian/rust,seanrivera/rust,GBGamer/rust,emk/rust,bombless/rust,defuz/rust,jashank/rust,gifnksm/rust,ruud-v-a/rust,stepancheg/rust-ide-rust,untitaker/rust,andars/rust,vhbit/rust,bombless/rust,andars/rust,ejjeong/rust,omasanori/rust,dinfuehr/rust,hauleth/rust,KokaKiwi/rust,AerialX/rust-rt-minimal,nwin/rust,barosl/rust,mdinger/rust,mahkoh/rust,philyoon/rust,TheNeikos/rust,nham/rust,aidancully/rust,defuz/rust,dwillmer/rust,gifnksm/rust,aidancully/rust,krzysz00/rust,dwillmer/rust,richo/rust,cllns/rust,mihneadb/rust,bombless/rust-docs-chinese,richo/rust,rprichard/rust,ktossell/rust,cllns/rust,andars/rust,mvdnes/rust,erickt/rust,ruud-v-a/rust,mihneadb/rust,XMPPwocky/rust,pshc/rust,ktossell/rust,aepsil0n/rust,rohitjoshi/rust,rprichard/rust,XMPPwocky/rust,erickt/rust,l0kod/rust,AerialX/rust,zachwick/rust,victorvde/rust,dinfuehr/rust,michaelballantyne/rust-gpu,stepancheg/rust-ide-rust,rohitjoshi/rust,defuz/rust,huonw/rand,jroesch/rust,AerialX/rust-rt-minimal,l0kod/rust,mahkoh/rust,quornian/rust,kimroen/rust,emk/rust,rprichard/rust,nwin/rust,0x73/rust,graydon/rust,hauleth/rust,ktossell/rust,mahkoh/rust,rprichard/rust,miniupnp/rust,graydon/rust,untitaker/rust,mdinger/rust,KokaKiwi/rust,gifnksm/rust,dwillmer/rust,ruud-v-a/rust