GtkTextView left and right margins
Since commit 3dca25b6, the handling of GtkTextViewPrivate:left_margin
in gtk_text_view_set_left_margin() is:
…
if (priv->left_margin != left_margin)
{
priv->left_margin = left_margin;
priv->left_margin = left_margin + priv->left_padding;
…
which not only is a dead store that would be detected by a static code analysis, but also suggests a logic error in the condition. The right margin code has a similar issue.
Edit: Also top_
and bottom_margin
.
Edit: Also, in the top_margin
case, does the increment to priv->yoffset
need to allow for priv->top_padding
?
Edited by Peter Bloomfield