Skip to content

Commit 91ae465

Browse files
committed
Stopped trying to edit fields in manage_variable_values_ini
manage_variable_values_ini no longer tries to edit fields in the particular INI file section. It's unnecessary because there is a promise to delete all entries from the section before inserting to ensure that all entries are completely managed. So trying to edit the fields doesn't make sense. set_variable_values_ini is available for editing specific values in an INI section. Ticket: CFE-3372 Changelog: Title
1 parent 668f761 commit 91ae465

1 file changed

Lines changed: 1 addition & 25 deletions

File tree

lib/files.cf

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -412,28 +412,6 @@ bundle edit_line manage_variable_values_ini(tab, sectionName)
412412
vars:
413413
"index" slist => getindices("$(tab)[$(sectionName)]");
414414

415-
# Be careful if the index string contains funny chars
416-
"cindex[$(index)]" string => canonify("$(index)");
417-
418-
classes:
419-
"edit_$(cindex[$(index)])" not => strcmp("$($(tab)[$(sectionName)][$(index)])","dontchange"),
420-
comment => "Create conditions to make changes";
421-
422-
field_edits:
423-
424-
# If the line is there, but commented out, first uncomment it
425-
"#+\s*$(index)\s*=.*"
426-
select_region => INI_section(escape("$(sectionName)")),
427-
edit_field => col("=","1","$(index)","set"),
428-
ifvarclass => "edit_$(cindex[$(index)])";
429-
430-
# match a line starting like the key something
431-
"\s*$(index)\s*=.*"
432-
edit_field => col("=","2","$($(tab)[$(sectionName)][$(index)])","set"),
433-
select_region => INI_section(escape("$(sectionName)")),
434-
classes => results("bundle", "manage_variable_values_ini_not_$(cindex[$(index)])"),
435-
ifvarclass => "edit_$(cindex[$(index)])";
436-
437415
delete_lines:
438416
".*"
439417
select_region => INI_section(escape("$(sectionName)")),
@@ -445,9 +423,7 @@ bundle edit_line manage_variable_values_ini(tab, sectionName)
445423
comment => "Insert lines";
446424

447425
"$(index)=$($(tab)[$(sectionName)][$(index)])"
448-
select_region => INI_section(escape("$(sectionName)")),
449-
ifvarclass => "!(manage_variable_values_ini_not_$(cindex[$(index)])_kept|manage_variable_values_ini_not_$(cindex[$(index)])_repaired).edit_$(cindex[$(index)])";
450-
426+
select_region => INI_section(escape("$(sectionName)"));
451427
}
452428

453429
##

0 commit comments

Comments
 (0)