Keep the words array in sync with value
This commit is contained in:
parent
65fb187afe
commit
c5e8c77526
@ -660,6 +660,7 @@ if ($newdir) {
|
||||
}
|
||||
if ($olddir && $newdir) {
|
||||
# Update in place
|
||||
$newdir->{'words'} = &wsplit($newdir->{'value'});
|
||||
if ($first) {
|
||||
# Just changing first and last line, like virtualhost IP
|
||||
$lref->[$olddir->{'line'}] = $newlines[0];
|
||||
@ -710,6 +711,7 @@ elsif (!$olddir && $newdir) {
|
||||
$addpos--;
|
||||
$addline = $pconf->[$addpos]->{'eline'}+1;
|
||||
}
|
||||
$newdir->{'words'} = &wsplit($newdir->{'value'});
|
||||
$newdir->{'file'} = $file;
|
||||
$newdir->{'line'} = $addline;
|
||||
$newdir->{'eline'} = $addline + scalar(@newlines) - 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user