fixes #379 (second try)

This commit is contained in:
boombuler
2016-09-28 21:54:34 +02:00
parent 13144d4b57
commit bc724bf781
3 changed files with 61 additions and 3 deletions

View File

@@ -777,7 +777,9 @@ func (v *View) DisplayView() {
}
// Now the tab has to be displayed as a bunch of spaces
tabSize := int(v.Buf.Settings["tabsize"].(float64))
for i := 0; i < tabSize-1; i++ {
visLoc := StringWidth(line[:colN], tabSize)
remainder := tabSize - (visLoc % tabSize)
for i := 0; i < remainder-1; i++ {
screenX++
if screenX-v.x-v.leftCol >= v.lineNumOffset {
v.drawCell(screenX-v.leftCol, screenY, ' ', nil, lineStyle)