// scr_add_lines only works for nlines <= nrow - 1.
if (nlines >= nrow - 1)
{
- if (!HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END)))
+ if (!(SHOULD_INVOKE (HOOK_ADD_LINES)
+ && HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END))))
scr_add_lines (buf, str - buf, nlines);
nlines = 0;
ch = next_char ();
}
- if (!HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END)))
+ if (!(SHOULD_INVOKE (HOOK_ADD_LINES)
+ && HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END))))
scr_add_lines (buf, str - buf, nlines);
/*
{
top_row = max (top_row - count, -saveLines);
- HOOK_INVOKE ((this, HOOK_SCROLL_BACK, DT_INT, count, DT_INT, top_row, DT_END));
-
// scroll everything up 'count' lines
term_start = (term_start + count) % total_rows;
&& view_start != 0
&& view_start != -saveLines)
scr_page (UP, count);
+
+ if (SHOULD_INVOKE (HOOK_SCROLL_BACK))
+ HOOK_INVOKE ((this, HOOK_SCROLL_BACK, DT_INT, count, DT_INT, top_row, DT_END));
}
else
{
num_scr += new_view_start - view_start;
view_start = new_view_start;
- HOOK_INVOKE ((this, HOOK_VIEW_CHANGE, DT_INT, view_start, DT_END));
want_refresh = 1;
+ HOOK_INVOKE ((this, HOOK_VIEW_CHANGE, DT_INT, view_start, DT_END));
+
return true;
}