diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-09-23 17:10:06 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-09-23 17:10:06 +0200 |
| commit | fed8b5e89cbdbaa7a9ea5427e6580ccf40409e57 (patch) | |
| tree | 8d216d8ac165cf26f9b0adc7cf801951ccbc9dbf /UConfig.pas | |
| parent | f790fca808d7fa61f7a4444d529485d4163dbff9 (diff) | |
| download | tuxcmd-fed8b5e89cbdbaa7a9ea5427e6580ccf40409e57.tar.xz | |
Implement find text combo history in Search dialog
Diffstat (limited to 'UConfig.pas')
| -rw-r--r-- | UConfig.pas | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/UConfig.pas b/UConfig.pas index f31394f..760d811 100644 --- a/UConfig.pas +++ b/UConfig.pas @@ -341,6 +341,10 @@ begin if i > 0 then for j := 0 to i - 1 do SearchHistory.Add(IniFile.ReadString('SearchHistory', Format('Item%d', [j]), '')); + i := IniFile.ReadInteger('SearchTextHistory', 'NumItems', 0); + if i > 0 then + for j := 0 to i - 1 do + SearchTextHistory.Add(IniFile.ReadString('SearchTextHistory', Format('Item%d', [j]), '')); end; ConfShowMounterBar := IniFile.ReadInteger(ConfProfileName, 'ShowMounterBar', ConfShowMounterBar); ConfSearchFilterCaseSensitive := IniFile.ReadBool(ConfProfileName, 'SearchFilterCaseSensitive', ConfSearchFilterCaseSensitive); @@ -395,6 +399,7 @@ begin IniFile.WriteInteger('CommandLineHistory', 'NumItems', CommandLineHistory.Count); IniFile.WriteInteger('SelectHistory', 'NumItems', SelectHistory.Count); IniFile.WriteInteger('SearchHistory', 'NumItems', SearchHistory.Count); + IniFile.WriteInteger('SearchTextHistory', 'NumItems', SearchTextHistory.Count); if CommandLineHistory.Count > 0 then for i := 0 to CommandLineHistory.Count - 1 do IniFile.WriteString('CommandLineHistory', Format('Item%d', [i]), CommandLineHistory[i]); @@ -404,6 +409,9 @@ begin if SearchHistory.Count > 0 then for i := 0 to SearchHistory.Count - 1 do IniFile.WriteString('SearchHistory', Format('Item%d', [i]), SearchHistory[i]); + if SearchTextHistory.Count > 0 then + for i := 0 to SearchTextHistory.Count - 1 do + IniFile.WriteString('SearchTextHistory', Format('Item%d', [i]), SearchTextHistory[i]); IniFile.WriteInteger(ConfProfileName, 'ShowMounterBar', ConfShowMounterBar); IniFile.WriteBool(ConfProfileName, 'SearchFilterCaseSensitive', ConfSearchFilterCaseSensitive); IniFile.WriteBool(ConfProfileName, 'SearchOtherFS', ConfSearchOtherFS); |
