You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shifting right with >> a number of times moves the cursor to the following expected sequence of columns: 18, 31, 42, 49, 54, 59.
Move word back to column 1.
:set shiftround
Shifting right with >> a number of times now moves the cursor to this sequence of columns: 18, 27, 40, 45, 50, 51.
Move word back to column 1.
Type I to insert at the start of the line.
Type Ctrl-T a number of times to shift word to the right.
Again, the sequence of column numbers is 18, 27, 40, 45, 50, 51.
The state of 'shiftround' does not affect the behavior of Ctrl-T because it always rounds.
Left shifts using << or Ctrl-D are not considered here because their movement is broken in other ways.
Right shifts are broken because of the way that rounding is calculated. The width between tab stops at the column of the first non-whitespace character in a line is divided into that column number to determine the indentation of the line in tab stops. That works fine if the tab stops are uniform, but not if they vary.
Expected behaviour
The line should be shifted so that the 'w' in 'word' falls one column to the right of the next tabstop column, as in the sequence of step 4 above.
Version of Vim
9.1.454
Environment
Operating system: Ubuntu 22.04
Terminal: XTerm(389)
Value of $TERM: xterm-256color
Shell: bash 5.1.16
Logs and stack traces
No response
The text was updated successfully, but these errors were encountered:
Since it's been over a week, here's an update. I wrote tests to cover every shift command and option combination I could think of and discovered a number of additional issues, some with my code, some with existing code, mostly having to do with variable-width tabstops when 'shiftwidth' is 0. The fixes are coming along well--it's just taking time.
Steps to reproduce
Right shifts are broken because of the way that rounding is calculated. The width between tab stops at the column of the first non-whitespace character in a line is divided into that column number to determine the indentation of the line in tab stops. That works fine if the tab stops are uniform, but not if they vary.
Expected behaviour
The line should be shifted so that the 'w' in 'word' falls one column to the right of the next tabstop column, as in the sequence of step 4 above.
Version of Vim
9.1.454
Environment
Operating system: Ubuntu 22.04
Terminal: XTerm(389)
Value of $TERM: xterm-256color
Shell: bash 5.1.16
Logs and stack traces
No response
The text was updated successfully, but these errors were encountered: