diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-12-10 07:46:51 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-12-10 07:46:51 +0800 |
commit | e0eba8f34f35b8295c3f353bc2d656ef09ee9d17 (patch) | |
tree | 5a5af35cff35fedc869e0a06d117f94a855c523f | |
parent | b16856bf76e33707ca8fcaa6ccad78c01d08e119 (diff) | |
download | gsoc2013-evolution-e0eba8f34f35b8295c3f353bc2d656ef09ee9d17.tar gsoc2013-evolution-e0eba8f34f35b8295c3f353bc2d656ef09ee9d17.tar.gz gsoc2013-evolution-e0eba8f34f35b8295c3f353bc2d656ef09ee9d17.tar.bz2 gsoc2013-evolution-e0eba8f34f35b8295c3f353bc2d656ef09ee9d17.tar.lz gsoc2013-evolution-e0eba8f34f35b8295c3f353bc2d656ef09ee9d17.tar.xz gsoc2013-evolution-e0eba8f34f35b8295c3f353bc2d656ef09ee9d17.tar.zst gsoc2013-evolution-e0eba8f34f35b8295c3f353bc2d656ef09ee9d17.zip |
Split the lines in this cell before testing whether we're to the right of
2000-12-09 Christopher James Lahey <clahey@helixcode.com>
* e-cell-text.c (_blink_scroll_timeout): Split the lines in this
cell before testing whether we're to the right of the right edge
of the text data (since that test uses the split lines.)
svn path=/trunk/; revision=6892
-rw-r--r-- | widgets/table/e-cell-text.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c index e007bf6f5e..30899383f3 100644 --- a/widgets/table/e-cell-text.c +++ b/widgets/table/e-cell-text.c @@ -1809,7 +1809,6 @@ _blink_scroll_timeout (gpointer data) ECellText *ect = E_CELL_TEXT (((ECellView *)text_view)->ecell); CellEdit *edit = text_view->edit; CurrentCell *cell = CURRENT_CELL(edit); - ECellTextLineBreaks *linebreaks = cell->breaks; gulong current_time; gboolean scroll = FALSE; @@ -1828,12 +1827,17 @@ _blink_scroll_timeout (gpointer data) } if (scroll && edit->button_down) { /* FIXME: Copy this for y. */ - if (edit->lastx - ect->x > cell->width && - edit->xofs_edit < linebreaks->max_width - cell->width) { - edit->xofs_edit += 4; - if (edit->xofs_edit > linebreaks->max_width - cell->width + 1) - edit->xofs_edit = linebreaks->max_width - cell->width + 1; - redraw = TRUE; + if (edit->lastx - ect->x > cell->width) { + ECellTextLineBreaks *linebreaks; + split_into_lines (cell); + linebreaks = cell->breaks; + if (edit->xofs_edit < linebreaks->max_width - cell->width) { + edit->xofs_edit += 4; + if (edit->xofs_edit > linebreaks->max_width - cell->width + 1) + edit->xofs_edit = linebreaks->max_width - cell->width + 1; + redraw = TRUE; + } + unref_lines (cell); } if (edit->lastx - ect->x < 0 && edit->xofs_edit > 0) { @@ -2380,7 +2384,7 @@ split_into_lines (CurrentCell *cell) gint len; char *text = cell->text; - ECellTextLineBreaks *linebreaks = cell->breaks; + ECellTextLineBreaks *linebreaks; if (! cell->breaks) { cell->breaks = g_new (ECellTextLineBreaks, 1); |