]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.0218: Unnecessary multiplications in backspace code v9.1.0218
authorzeertzjq <zeertzjq@outlook.com>
Thu, 28 Mar 2024 09:30:08 +0000 (10:30 +0100)
committerChristian Brabandt <cb@256bit.org>
Thu, 28 Mar 2024 09:30:08 +0000 (10:30 +0100)
commit8ede7a069419e0e01368c65a2d0c79d6332aa6cd
tree8b6a70866e924d99d8710de10828fa42a78f13cf
parent2ca7d5f4831ce3d86cdc3f0c844fc50ea0deb7e5
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>
src/edit.c
src/indent.c
src/testdir/test_edit.vim
src/version.c