Revert "term_font: fix iTerm2 checking 2 more profiles than exists"

This reverts commit 15c2939779.
This commit is contained in:
Andrew Titmuss 2018-05-24 14:27:39 +10:00
parent 5143b20ce1
commit f49919e957

View file

@ -2800,10 +2800,9 @@ END
font_file="${HOME}/Library/Preferences/com.googlecode.iterm2.plist"
# Count Guids in "New Bookmarks"; they should be unique
profiles_count="$(PlistBuddy -c "Print :New\ Bookmarks:" "$font_file" | \
grep -w -c "Guid")"
profiles_count="$(PlistBuddy -c "Print :New\ Bookmarks:" "$font_file" | grep -c "Guid")"
for ((i=0; i<profiles_count; i++)); do
for ((i=0; i<=profiles_count; i++)); do
profile_name="$(PlistBuddy -c "Print :New\ Bookmarks:${i}:Name:" "$font_file")"
if [[ "$profile_name" == "$current_profile_name" ]]; then