diff options
Diffstat (limited to 'git-rediff.c')
| -rw-r--r-- | git-rediff.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/git-rediff.c b/git-rediff.c index 36a5134..586daec 100644 --- a/git-rediff.c +++ b/git-rediff.c @@ -24,6 +24,7 @@ enum interactive_command { INTERACTIVE_ERROR, INTERACTIVE_REDIFF, INTERACTIVE_EDIT, + INTERACTIVE_REDRAW, INTERACTIVE_SKIP_FILE }; @@ -642,6 +643,8 @@ again: } if (c != '\n') dprintf(ttyfd_out, "\n"); + if (c == 'L' - '@') + return INTERACTIVE_REDRAW; #ifndef TEST if (c == 'Z' - '@') { if (tcsetattr(ttyfd, TCSANOW, &tty_settings)) @@ -941,10 +944,15 @@ rediff_file(struct text *text_out, const struct text *text_in, size_t conflict_m hunk.nsubs = (size_t)subhunk + 1U; if (command != INTERACTIVE_SKIP_FILE) { hunkno++; + reprompt: display_hunk(text_in, (size_t)(hunk.subs[0].head - text_in->lines), i, &hunk, conflict_marker_size); command = get_command(hunk.nsubs, hunkno, nhunks); if (command == INTERACTIVE_ERROR) goto error; + if (command == INTERACTIVE_REDRAW) { + dprintf(ttyfd_out, "\033[H\033[2J"); + goto reprompt; + } } if (command == INTERACTIVE_EDIT) r = manual_edit(text_out, &hunk, &text_in->lines[i], conflict_marker_size); |
