From 7bb61307e04b8fc9eb7dc00ca07b1da1f33bd776 Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Sat, 18 Feb 2017 21:41:52 -0500 Subject: [PATCH] Fix tab size --- cmd/micro/cellview.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/micro/cellview.go b/cmd/micro/cellview.go index 5d03ade3..33d8f2cf 100644 --- a/cmd/micro/cellview.go +++ b/cmd/micro/cellview.go @@ -98,8 +98,7 @@ func (c *CellView) Draw(buf *Buffer, top, height, left, width int) { if char == '\t' { c.lines[viewLine][viewCol] = &Char{Loc{viewCol, viewLine}, Loc{colN, lineN}, indentchar, curStyle} - // TODO: this always adds 4 spaces but it should really add just the remainder to the next tab location - viewCol += tabsize + viewCol += tabsize - viewCol%tabsize } else if runewidth.RuneWidth(char) > 1 { c.lines[viewLine][viewCol] = &Char{Loc{viewCol, viewLine}, Loc{colN, lineN}, char, curStyle} viewCol += runewidth.RuneWidth(char)