Page MenuHomePhabricator

[clang-diff] HTML diff navigation
ClosedPublic

Authored by johannes on Aug 14 2017, 8:55 AM.

Details

Summary

This adds shortcuts j and k to jump between changes.
It is especially useful in diffs with few changes.

Diff Detail

Repository
rL LLVM

Event Timeline

johannes created this revision.Aug 14 2017, 8:55 AM
johannes updated this revision to Diff 112126.Aug 22 2017, 2:01 AM

some refactoring

arphaman edited edge metadata.EditedAug 23 2017, 12:17 AM

LGTM. There are some unrelated highlighting bugs in HTML though, for example if you take:

before:

int foo();

void bar(int x) {
  switch (x) {
  case 0:
    bar(2);
  }
}

after:

void bar(int x) {
  switch (x) {
  case 4:
    bar(2);
    break;
  case 1:
    bar(3);
    break;
  }
}

int foo();

int zed();

Then first time bar is selected in the new source the whole function is highlighted. Then, if you select 4 in the new source and then re-select the function bar again, bar is highlighted, but there's a gap where 4 is. It should be addressed in another patch though.

This revision was automatically updated to reflect the committed changes.