summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2009-02-13 09:50:21 -0800
committerShawn O. Pearce <sop@google.com>2009-02-13 10:58:43 -0800
commit2b1f308a29d9e18ee621c93f3bd3d18381680f0c (patch)
tree26bdfe8d1e0e25f6e078cd61ae379065472cad35
parent6139a6d534ff1d88d8683efc80363e815b75743e (diff)
Fix line numbers for new post-image comments in unified view
The line numbers we were using to create new post-image comment editors in the unified diff view were wrong. Due to a simple copy and paste error we were using the old (aka pre-image) line number for the line, which always caused the comment to appear in the wrong location later on, even though we showed it at the right location initially. Signed-off-by: Shawn O. Pearce <sop@google.com>
-rw-r--r--src/main/java/com/google/gerrit/client/patches/UnifiedDiffTable.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/gerrit/client/patches/UnifiedDiffTable.java b/src/main/java/com/google/gerrit/client/patches/UnifiedDiffTable.java
index 8204ac428d..57c1cefdcf 100644
--- a/src/main/java/com/google/gerrit/client/patches/UnifiedDiffTable.java
+++ b/src/main/java/com/google/gerrit/client/patches/UnifiedDiffTable.java
@@ -31,7 +31,7 @@ public class UnifiedDiffTable extends AbstractPatchContentTable {
createCommentEditor(row + 1, column, pl.getOldLineNumber(), (short) 0);
break;
case POST_IMAGE:
- createCommentEditor(row + 1, column, pl.getOldLineNumber(), (short) 1);
+ createCommentEditor(row + 1, column, pl.getNewLineNumber(), (short) 1);
break;
}
}