SideBySide2: Add shift-m to mark reviewed and open next file

In the old UI "M" marked the reviewed flag (if not already set)
and moved to the next file in the change. Implement a similar
behavior in the new SideBySide2 UI.

Bind as "shift m" instead of "M" due to vim mode using lowercase
"m" as a mark character, which some users may actually use to make
bookmarks during a review.

Change-Id: I1e7780e6265fa3380aae09c034583dec7ec4830a
This commit is contained in:
Shawn Pearce
2013-12-30 16:30:20 -08:00
parent 132194e80a
commit 9dff161cf4
2 changed files with 20 additions and 0 deletions

View File

@@ -310,6 +310,18 @@ class Header extends Composite {
}
}
Runnable reviewedAndNext() {
return new Runnable() {
@Override
public void run() {
if (Gerrit.isSignedIn()) {
reviewed.setValue(true, true);
}
navigate(Direction.NEXT).run();
}
};
}
String getNextPath() {
return nextPath;
}