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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim indent file
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: dune
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Maintainers: Markus Mottl <markus.mottl@gmail.com>
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " URL: https://github.com/ocaml/vim-ocaml
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
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
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 if exists("b:did_indent")
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 finish
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 endif
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 let b:did_indent = 1
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 " dune format-dune-file uses 1 space to indent
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
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<"