if (!newgap)
{
- if (unchanged_modified == MODIFF)
+ if (unchanged_modified == MODIFF
+ && overlay_unchanged_modified == OVERLAY_MODIFF)
{
beg_unchanged = pos;
end_unchanged = Z - pos - 1;
pos--;
- if (unchanged_modified == MODIFF)
+ if (unchanged_modified == MODIFF
+ && overlay_unchanged_modified == OVERLAY_MODIFF)
+
{
beg_unchanged = pos;
end_unchanged = Z - pos - 1;
prepare_to_modify_buffer (start, end);
- if (start - 1 < beg_unchanged || unchanged_modified == MODIFF)
+ if (start - 1 < beg_unchanged
+ || (unchanged_modified == MODIFF
+ && overlay_unchanged_modified == OVERLAY_MODIFF))
beg_unchanged = start - 1;
if (Z - end < end_unchanged
- || unchanged_modified == MODIFF)
+ || (unchanged_modified == MODIFF
+ && overlay_unchanged_modified == OVERLAY_MODIFF))
end_unchanged = Z - end;
if (MODIFF <= SAVE_MODIFF)