In RStudio, for example, although I set “Insert spaces for tab” to “Tab width 2”, I feel that the number of spaces inserted is unstable.

If the number of characters on the line is even, it operates normally.

However, when the number of characters is odd, the number of spaces is 1.

With macOS 10.13.1, the version of RStudio is 1.1.383.