[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
diff-mode reports offsets incorrectly
From: |
Nick Roberts |
Subject: |
diff-mode reports offsets incorrectly |
Date: |
Tue, 5 Feb 2008 18:04:20 +1300 |
diff-mode reports offsets if the first hunk replaces code with a different
number of lines.
Consider the patch below. The first hunk removes four lines and adds one.
When the second hunk is applied Emacs reports:
Hunk applied at offset 3 lines
but this is only because 4 - 1 = 3, and Emacs is presumably looking at the
line numbering before the first hunk was applied.
This didn't happen in Emacs 21.4, but happens in EMACS_22_BASE and trunk.
I don't know about Emacs 22.1
--- breakpoint.c 05 Feb 2008 13:46:40 +1300
*************** print_one_breakpoint_location (struct br
*** 3425,3434 ****
/* 4 */
annotate_field (3);
if (part_of_multiple)
! ui_out_field_string (uiout, "enabled",
! loc->shlib_disabled
! ? (loc->enabled ? "y(p)" : "n(p)")
! : (loc->enabled ? "y" : "n"));
else
{
int pending = (b->loc == NULL || b->loc->shlib_disabled);
--- 3425,3431 ----
/* 4 */
annotate_field (3);
if (part_of_multiple)
! ui_out_field_string (uiout, "enabled", loc->enabled ? "y" : "n");
else
{
int pending = (b->loc == NULL || b->loc->shlib_disabled);
*************** print_one_breakpoint_location (struct br
*** 3436,3446 ****
...
--
Nick http://www.inet.net.nz/~nickrob
- diff-mode reports offsets incorrectly,
Nick Roberts <=