]> git.neil.brown.name Git - wiggle.git/commitdiff
Browse: git problem in rendering file list.
authorNeilBrown <neilb@suse.de>
Sun, 11 Nov 2012 21:21:34 +0000 (08:21 +1100)
committerNeilBrown <neilb@suse.de>
Sun, 11 Nov 2012 21:50:22 +0000 (08:50 +1100)
Now that we display the last keystroke at the very end of the
first line it is wrong to 'clrtoeol' afterwards as that will
clear the next line.

So remove that, make sure we clear the spaces before the number
incase it becomes shorter, and tidy up the display for 'ESC...' too.

Reported-by: Manpreet Singh <junkblocker@yahoo.com>
Signed-off-by: NeilBrown <neilb@suse.de>
vpatch.c

index 0a02b1912a4963cb9059ee7627a6cc4d8224a34c..280ad61f3a2b004eb88545e57daad5b49b34685a 100644 (file)
--- a/vpatch.c
+++ b/vpatch.c
@@ -2179,9 +2179,9 @@ static void main_window(struct plist *pl, int n, FILE *f, int reverse)
                        }
                }
                {char bb[20];
-                       sprintf(bb, "%d", c);
+                       sprintf(bb, "  %d", c);
+                       attrset(0);
                        mvaddstr(0, cols-strlen(bb), bb);
-                       clrtoeol();
                }
                move(row, 9);
                c = getch();
@@ -2221,10 +2221,12 @@ static void main_window(struct plist *pl, int n, FILE *f, int reverse)
                        }
                        break;
                case 27: /* escape */
-                       mvaddstr(0, 70, "ESC..."); clrtoeol();
+                       attrset(0);
+                       mvaddstr(0, cols-10, "ESC..."); clrtoeol();
                        c = getch();
                        switch (c) {
                        }
+                       move(0, cols-10); clrtoeol();
                        break;
                case 'q':
                        return;