dump: Trim spaces only in color mode 0 or -1
commit645e9f22fef4eceecdd9b4f30f2566cd4520a7cd
authorKalle Olavi Niemitalo <kon@iki.fi>
Sun, 21 Jun 2009 16:29:14 +0000 (21 19:29 +0300)
committerKalle Olavi Niemitalo <Kalle@Astalo.kon.iki.fi>
Sun, 21 Jun 2009 16:35:50 +0000 (21 19:35 +0300)
tree5e700c01fe5d0cfe9521034ba751000cf0f40a80
parent9bc79e4ecfbd23260110d9fb5345075a6ebc1d5d
dump: Trim spaces only in color mode 0 or -1

The old code failed to write pending spaces before changing the
background color.  That seems hard to fix without duplicating code,
and ELinks pads dumped lines to the requested width in these color
modes anyway, so this commit just makes ELinks write all spaces
immediately when colors are being used.

Try the following command before and after this commit:
elinks --no-home --eval "set document.colors.use_document_colors = 2" \
--dump-color-mode 1 --dump test/color.html
src/viewer/dump/dump-specialized.h