Enable expanding skipped lines even if 'Syntax Coloring' is off
On SideBySide diff UI if 'Syntax Coloring' is disabled attempting to expand 'skipped common xx lines' will result in only one line displaying on the left side. Enabling 'Syntax Coloring' makes the expand work correctly on both sides. This issue has existed since v2.3, as the server was not including enough file content to support expanding the skipped regions. Change-Id: I6f33b21415746a54c0cdc507246c139b49cd045d
This commit is contained in:
@@ -292,17 +292,17 @@ public abstract class AbstractPatchContentTable extends NavigationTable<Object>
|
||||
protected SparseHtmlFile getSparseHtmlFileB(PatchScript s) {
|
||||
AccountDiffPreference dp = new AccountDiffPreference(s.getDiffPrefs());
|
||||
|
||||
SparseFileContent b = s.getB();
|
||||
PrettyFormatter f = ClientSideFormatter.FACTORY.get();
|
||||
f.setDiffPrefs(dp);
|
||||
f.setFileName(s.getB().getPath());
|
||||
f.setFileName(b.getPath());
|
||||
f.setEditFilter(PrettyFormatter.B);
|
||||
f.setEditList(s.getEdits());
|
||||
|
||||
if (dp.isSyntaxHighlighting() && s.getA().isWholeFile() && !s.getB().isWholeFile()) {
|
||||
f.format(s.getB().apply(s.getA(), s.getEdits()));
|
||||
} else {
|
||||
f.format(s.getB());
|
||||
if (s.getA().isWholeFile() && !b.isWholeFile()) {
|
||||
b = b.apply(s.getA(), s.getEdits());
|
||||
}
|
||||
f.format(b);
|
||||
return f;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user