summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f97f401)
raw | patch | inline | side by side (parent: f97f401)
author | Jonas Fonseca <fonseca@diku.dk> | |
Tue, 23 May 2006 22:29:24 +0000 (00:29 +0200) | ||
committer | Jonas Fonseca <fonseca@antimatter.localdomain> | |
Tue, 23 May 2006 22:30:42 +0000 (00:30 +0200) |
- Show line info even if no lines has been loaded, so less has to be
redrawn.
- Don't make the view window one line bigger causing the title window
to be overwritten. This reinstates the bug in last line drawing.
redrawn.
- Don't make the view window one line bigger causing the title window
to be overwritten. This reinstates the bug in last line drawing.
tig.c | patch | blob | history |
index 05fb370e22a76722863623d88e85f7b94e5dc227..52abe0fda6cb031741ec9b721a0b7598a51e592f 100644 (file)
--- a/tig.c
+++ b/tig.c
else
wprintw(view->title, "[%s]", view->name);
- if (view->lines) {
+ if (view->lines || view->pipe) {
+ unsigned int lines = view->lines
+ ? (view->lineno + 1) * 100 / view->lines
+ : 0;
+
wprintw(view->title, " - %s %d of %d (%d%%)",
view->ops->type,
view->lineno + 1,
view->lines,
- (view->lineno + 1) * 100 / view->lines);
+ lines);
}
if (view->pipe) {
offset = 0;
foreach_view (view, i) {
- /* Keep the height of all view->win windows one larger than is
- * required so that the cursor can wrap-around on the last line
- * without scrolling the window. */
if (!view->win) {
- view->win = newwin(view->height + 1, 0, offset, 0);
+ view->win = newwin(view->height, 0, offset, 0);
if (!view->win)
die("Failed to create %s view", view->name);
die("Failed to create title window");
} else {
- wresize(view->win, view->height + 1, view->width);
+ wresize(view->win, view->height, view->width);
mvwin(view->win, offset, 0);
mvwin(view->title, offset + view->height, 0);
wrefresh(view->win);
* outside the current view causing bad wrapping. Same goes
* for title and status windows.
*
+ * - The cursor can wrap-around on the last line and cause the
+ * window to scroll.
+ *
* TODO
* ----
* Features that should be explored.