about summary refs log tree commit diff
path: root/src/rustllvm/ExecutionEngineWrapper.cpp
diff options
context:
space:
mode:
authorChris Morgan <me@chrismorgan.info>2014-02-27 16:54:54 +1100
committerAlex Crichton <alex@alexcrichton.com>2014-02-27 21:04:04 -0800
commit879ac436890ca8f810b9b8275e4e0ec488f9c5d5 (patch)
treec6edf2338c404788402e175e0e6a46f02aad7c95 /src/rustllvm/ExecutionEngineWrapper.cpp
parent0a663a2d3173832d656f4b2a31009407444defe7 (diff)
downloadrust-879ac436890ca8f810b9b8275e4e0ec488f9c5d5.tar.gz
rust-879ac436890ca8f810b9b8275e4e0ec488f9c5d5.zip
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.
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions