Fix #587
The main problem here is that when setting s_index in xvim_sb
the expression in `if` statement cause interger underflow
and was not compared as intended.