diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2026-01-29 08:22:59 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2026-01-29 08:23:15 +0800 |
| commit | 3739376af7110b8d98ba884d76b704c978c11375 (patch) | |
| tree | 462a68d5288f1d5ae270afa24748c02f0158ea6a /test/functional/vimscript/executable_spec.lua | |
| parent | bfb30f7599b666826354198c6dde81840ac1323e (diff) | |
| download | rneovim-3739376af7110b8d98ba884d76b704c978c11375.tar.gz rneovim-3739376af7110b8d98ba884d76b704c978c11375.tar.bz2 rneovim-3739376af7110b8d98ba884d76b704c978c11375.zip | |
vim-patch:663d809: runtime(rust): Fix Rust indentation when string contains "if"
indent/rust.vim behaves incorrectly when a string literal contains the
substring "if".
For example, in this code:
let x = "
motif
";
struct X {
}
indent/rust.vim thinks that the closing "}" should line up with "motif".
This patch fixes the issue by checking whether the "if" is in a string
literal or comment before considering it to be a match for a subsequent
brace (and also by requiring it to start on a word boundary).
Add an indent test to ensure this does not regress.
closes: vim/vim#19265
https://github.com/vim/vim/commit/663d809194b471ebbdd9e270086c6d0ca53da8fd
Co-authored-by: taylor.fish <contact@taylor.fish>
Diffstat (limited to 'test/functional/vimscript/executable_spec.lua')
0 files changed, 0 insertions, 0 deletions