-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clear (\033[m) is put after each call to tb_change_cell #30
Comments
nullgemm
pushed a commit
to nullgemm/termbox_next
that referenced
this issue
Aug 26, 2018
The bug was caused by a wrong assumption that individual write_sgr functions are there for optimization purposes. They are not. Their purpose is to make TB_DEFAULT work. Therefore TB_DEFAULT != lastfg/lastbg. In fact the send_attr puts SGR0 as soon as it detects deviation from lastfg or lastbg, which means the actual attributes are equal to terminal defaults from that point. The fix restores the previous logic for NORMAL mode and forces a complete update for other output modes. Again, complete doesn't mean less optimized, it was complete in most of the cases before as well. The update happens partially only if the TB_DEFAULT is involved. cherry-pick ed4dfdf
nullgemm
pushed a commit
to nullgemm/termbox_next
that referenced
this issue
Jul 27, 2020
The bug was caused by a wrong assumption that individual write_sgr functions are there for optimization purposes. They are not. Their purpose is to make TB_DEFAULT work. Therefore TB_DEFAULT != lastfg/lastbg. In fact the send_attr puts SGR0 as soon as it detects deviation from lastfg or lastbg, which means the actual attributes are equal to terminal defaults from that point. The fix restores the previous logic for NORMAL mode and forces a complete update for other output modes. Again, complete doesn't mean less optimized, it was complete in most of the cases before as well. The update happens partially only if the TB_DEFAULT is involved. cherry-pick ed4dfdf
nullgemm
pushed a commit
to nullgemm/termbox_next
that referenced
this issue
Jul 27, 2020
The bug was caused by a wrong assumption that individual write_sgr functions are there for optimization purposes. They are not. Their purpose is to make TB_DEFAULT work. Therefore TB_DEFAULT != lastfg/lastbg. In fact the send_attr puts SGR0 as soon as it detects deviation from lastfg or lastbg, which means the actual attributes are equal to terminal defaults from that point. The fix restores the previous logic for NORMAL mode and forces a complete update for other output modes. Again, complete doesn't mean less optimized, it was complete in most of the cases before as well. The update happens partially only if the TB_DEFAULT is involved. cherry-pick ed4dfdf
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
try the following code snippet in normal color mode:
The forground color changes after the first
tb_change_cell()
to white.Only the
bg
(color) parameter changes that's why the code calls write_sgr_bg() but somehow a clear was introduced earlier so that the foreground value is negated/overwritten by the default one.I tested it against
e742ddb5908dff205dde338b50f3a92ec2e844e1
and it worked.So my commits introduced a bug.
I will look into it tomorrow evening.
The text was updated successfully, but these errors were encountered: