]> Cypherpunks repositories - gostls13.git/commit
text/tabwriter: don't mimic previous lines on flush
authorJosh Bleecher Snyder <josharian@gmail.com>
Sun, 6 May 2018 04:26:23 +0000 (21:26 -0700)
committerRobert Griesemer <gri@golang.org>
Mon, 7 May 2018 17:53:13 +0000 (17:53 +0000)
commita33c595753ea52421818069a923d8acccbf692ff
treee4e9f0e4f23afc0afd6162c7956b5441b8cf5f69
parent3fbfc83db298c55669b6165eca1b8a56b04c895c
text/tabwriter: don't mimic previous lines on flush

\f triggers a flush.

This is used (by gofmt, among others) to indicate that
the current aligned segment has ended.

When flushed, it is unlikely that the previous line is
in fact a good predictor of the upcoming line,
so stop treating it as such.

No performance impact on the existing benchmarks,
which do not perform any flushes.

Change-Id: Ifdf3e6d4600713c90db7b51a10e429d9260dc08c
Reviewed-on: https://go-review.googlesource.com/111644
Reviewed-by: Robert Griesemer <gri@golang.org>
src/text/tabwriter/tabwriter.go