mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 06:03:28 +00:00
Correctly set file and lines on newly created sub-directives
This commit is contained in:
@@ -291,6 +291,11 @@ splice(@$lref, $section->{'line'}, $oldlen, @newlines);
|
||||
&renumber($conf, $section->{'eline'}, $section->{'file'},
|
||||
scalar(@newlines)-$oldlen);
|
||||
$section->{'eline'} = $section->{'line'} + scalar(@newlines) - 1;
|
||||
my $i = 1;
|
||||
foreach my $m (@{$section->{'members'}}) {
|
||||
$m->{'line'} = $m->{'eline'} = $section->{'line'} + $i++;
|
||||
$m->{'file'} = $section->{'file'};
|
||||
}
|
||||
}
|
||||
|
||||
# renumber(&conf, line, file, offset)
|
||||
|
||||
Reference in New Issue
Block a user