aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetter Rodhelind <petter.rodhelind@gmail.com>2018-02-23 15:57:39 +0100
committerPetter Rodhelind <petter.rodhelind@gmail.com>2018-02-23 15:57:39 +0100
commit1c59fbff6df189ae1e935a9b84a7ed5df06c4282 (patch)
tree83813320a37784dcff99948566d3fee5965368b0
parent0830c7a397a5334c203cda23e4ad9171245aff2c (diff)
downloadpoe-1c59fbff6df189ae1e935a9b84a7ed5df06c4282.tar.gz
poe-1c59fbff6df189ae1e935a9b84a7ed5df06c4282.tar.bz2
poe-1c59fbff6df189ae1e935a9b84a7ed5df06c4282.zip
Fix tabstop draw to align with each views initial x and not the global x.
-rw-r--r--view.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/view.go b/view.go
index ef04207..4d9150a 100644
--- a/view.go
+++ b/view.go
@@ -245,7 +245,7 @@ func (b *View) Draw() {
case '\t': // show tab until next even tabstop width
screen.SetContent(x, y, '\t', nil, style)
x++
- for x%b.tabstop != 0 {
+ for (x-b.x)%b.tabstop != 0 {
screen.SetContent(x, y, ' ', nil, fillstyle)
x++
}