Is the behavior of "Insert spaces for tab" unstable?

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.


This is how it's supposed to work. With tab width = 2, there's a tab stop on every other column. Pressing "tab" will insert the number of spaces required to move your cursor to the next tab stop, which could be 1 or 2 spaces away.

1 Like