summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0a0d891)
raw | patch | inline | side by side (parent: 0a0d891)
author | Jonas Fonseca <fonseca@diku.dk> | |
Tue, 29 May 2007 11:08:21 +0000 (13:08 +0200) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Tue, 29 May 2007 11:08:21 +0000 (13:08 +0200) |
Reproducable by opening the tree view, then maximizing the blob view,
move up, and then closing the blob view, causing the view->offset to
have "wrapped around" and nothing to be displayed in the tree view.
The invalid update of view->offset only happend when moving
non-displayed views. Instead use the checked scroll_steps variable
instead of the steps variable. Add a guarding assert after the update.
move up, and then closing the blob view, causing the view->offset to
have "wrapped around" and nothing to be displayed in the tree view.
The invalid update of view->offset only happend when moving
non-displayed views. Instead use the checked scroll_steps variable
instead of the steps variable. Add a guarding assert after the update.
tig.c | patch | blob | history |
index 00888dd7a504160cb88ea758ea19315e57bb752b..7cf25ca4507a26d7c493278e15e2bfc2f71e126f 100644 (file)
--- a/tig.c
+++ b/tig.c
}
if (!view_is_displayed(view)) {
- view->offset += steps;
+ view->offset += scroll_steps;
+ assert(0 <= view->offset && view->offset < view->lines);
view->ops->select(view, &view->line[view->lineno]);
return;
}