Mercurial > vim
comparison runtime/indent/rust.vim @ 33052:5c220cf30f1f
runtime: Set b:undo_indent where missing (#12944)
Commit: https://github.com/vim/vim/commit/0382f05dbd659d8e39ee4e71c1e5062ac5c0a8fd
Author: dkearns <dougkearns@gmail.com>
Date: Tue Aug 29 05:32:59 2023 +1000
runtime: Set b:undo_indent where missing (https://github.com/vim/vim/issues/12944)
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 28 Aug 2023 21:45:07 +0200 |
parents | 2ff007677dba |
children | 555fede66c30 |
comparison
equal
deleted
inserted
replaced
33051:02939ae3aaca | 33052:5c220cf30f1f |
---|---|
1 " Vim indent file | 1 " Vim indent file |
2 " Language: Rust | 2 " Language: Rust |
3 " Author: Chris Morgan <me@chrismorgan.info> | 3 " Author: Chris Morgan <me@chrismorgan.info> |
4 " Last Change: 2017 Jun 13 | 4 " Last Change: 2017 Jun 13 |
5 " 2023 Aug 28 by Vim Project (undo_indent) | |
5 " For bugs, patches and license go to https://github.com/rust-lang/rust.vim | 6 " For bugs, patches and license go to https://github.com/rust-lang/rust.vim |
6 | 7 |
7 " Only load this indent file when no other was loaded. | 8 " Only load this indent file when no other was loaded. |
8 if exists("b:did_indent") | 9 if exists("b:did_indent") |
9 finish | 10 finish |
21 setlocal autoindent " indentexpr isn't much help otherwise | 22 setlocal autoindent " indentexpr isn't much help otherwise |
22 " Also do indentkeys, otherwise # gets shoved to column 0 :-/ | 23 " Also do indentkeys, otherwise # gets shoved to column 0 :-/ |
23 setlocal indentkeys=0{,0},!^F,o,O,0[,0] | 24 setlocal indentkeys=0{,0},!^F,o,O,0[,0] |
24 | 25 |
25 setlocal indentexpr=GetRustIndent(v:lnum) | 26 setlocal indentexpr=GetRustIndent(v:lnum) |
27 | |
28 let b:undo_indent = "setlocal cindent< cinoptions< cinkeys< cinwords< lisp< autoindent< indentkeys< indentexpr<" | |
26 | 29 |
27 " Only define the function once. | 30 " Only define the function once. |
28 if exists("*GetRustIndent") | 31 if exists("*GetRustIndent") |
29 finish | 32 finish |
30 endif | 33 endif |