summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Czapliński <czapkofan@gmail.com>2018-03-10 21:49:41 +0100
committerMateusz Czapliński <czapkofan@gmail.com>2018-03-10 21:49:41 +0100
commitd949d78e617edfa430d834540270deae8eb0ebe7 (patch)
tree7ea9e085b0f82f5d98fd25e0e716543246bf0a6a
parent1cc58d089424d1025f7d31f6c5b0137cc1ff830e (diff)
truncate long lines instead of wrapping
-rw-r--r--up.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/up.go b/up.go
index c4de9e0..b7d0843 100644
--- a/up.go
+++ b/up.go
@@ -37,6 +37,7 @@ func main() {
subprocess *Subprocess
inputBuf = NewBuf()
buf = inputBuf
+ // bufStyle = BufDrawing{}
)
// In background, start collecting input from stdin to internal buffer of size 40 MB, then pause it
@@ -166,7 +167,8 @@ func (b *Buf) Draw(y0 int) {
}
x++
if x > w {
- x, y = 0, y+1
+ // x, y = 0, y+1
+ b.putch(w-1, y, '»') // TODO: also «
}
}
for ; y < h; y++ {
@@ -322,3 +324,9 @@ func (s *Subprocess) Kill() {
}
s.cancel()
}
+
+// type BufDrawing struct {
+// Wrap bool
+// // TODO: Page int -- or maybe better: Y int (for pgup/pgdn scrolling)
+// // TODO: X int (for left<->right scrolling)
+// }