summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 59f7748)
raw | patch | inline | side by side (parent: 59f7748)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sun, 15 Feb 2009 16:28:12 +0000 (17:28 +0100) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Sun, 15 Feb 2009 17:03:57 +0000 (18:03 +0100) |
Tig now behaves similar to less in that the user can scroll without
limit to the right.
limit to the right.
tig.c | patch | blob | history |
index 1b5f0f22513fd6bfa59a669524d9ef2129162171..9c6cf010121229e65245f038de74e76c529bcaea 100644 (file)
--- a/tig.c
+++ b/tig.c
enum line_type curtype; /* Attribute currently used for drawing. */
unsigned long col; /* Column when drawing. */
bool has_scrolled; /* View was scrolled. */
- bool can_hscroll; /* View can be scrolled horizontally. */
/* Loading */
struct io io;
col++;
}
- if (view->col + col >= view->width + view->yoffset)
- view->can_hscroll = TRUE;
-
return col;
}
{
assert(0 <= lineno && lineno < view->height);
- if (lineno == 0)
- view->can_hscroll = FALSE;
-
for (; lineno < view->height; lineno++) {
if (!draw_view_line(view, lineno))
break;
report("");
return;
case REQ_SCROLL_RIGHT:
- if (!view->can_hscroll) {
- report("Cannot scroll beyond the last column");
- return;
- }
view->yoffset += apply_step(opt_hscroll, view->width);
if (view->yoffset > view->width)
view->yoffset = view->width;