Mercurial > vim
annotate runtime/indent/dune.vim @ 34674:bfd2c0032686 v9.1.0218
patch 9.1.0218: Unnecessary multiplications in backspace code
Commit: https://github.com/vim/vim/commit/8ede7a069419e0e01368c65a2d0c79d6332aa6cd
Author: zeertzjq <zeertzjq@outlook.com>
Date: Thu Mar 28 10:30:08 2024 +0100
patch 9.1.0218: Unnecessary multiplications in backspace code
Problem: Unnecessary multiplications in backspace code, as
"col / ts * ts" is the same as "col - col % ts".
Solution: Change "col / ts * ts" to "col - col % ts". Adjust the loop
and the comments ins_bs() to be easier to understand. Update
tests to reset 'smarttab' properly.
(zeertzjq)
closes: #14308
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 28 Mar 2024 10:45:04 +0100 |
parents | 5c220cf30f1f |
children |
rev | line source |
---|---|
23466 | 1 " Vim indent file |
2 " Language: dune | |
3 " Maintainers: Markus Mottl <markus.mottl@gmail.com> | |
4 " URL: https://github.com/ocaml/vim-ocaml | |
5 " Last Change: 2021 Jan 01 | |
33052
5c220cf30f1f
runtime: Set b:undo_indent where missing (#12944)
Christian Brabandt <cb@256bit.org>
parents:
23466
diff
changeset
|
6 " 2023 Aug 28 by Vim Project (undo_indent) |
23466 | 7 |
8 if exists("b:did_indent") | |
9 finish | |
10 endif | |
11 let b:did_indent = 1 | |
12 | |
13 " dune format-dune-file uses 1 space to indent | |
14 setlocal softtabstop=1 shiftwidth=1 expandtab | |
33052
5c220cf30f1f
runtime: Set b:undo_indent where missing (#12944)
Christian Brabandt <cb@256bit.org>
parents:
23466
diff
changeset
|
15 |
5c220cf30f1f
runtime: Set b:undo_indent where missing (#12944)
Christian Brabandt <cb@256bit.org>
parents:
23466
diff
changeset
|
16 let b:undo_indent = "setl et< sts< sw<" |