edit_feed (Raggle::Interfaces::NcursesInterface)

    # File raggle, line 3390
          def NcursesInterface::edit_feed(feedopt)
            str = NcursesInterface::get_input('new_value')

            error = false
            if str and str.length > 0
              error = true if (feedopt == 'priority' or feedopt == 'refresh') and
                              str !~ /^-?\d+$/
              error = true if feedopt == 'max_items' and
                              not (str =~ /^\d+$/ or str =~ /none|nil/i)
              error = true if (feedopt == 'url' or feedopt == 'site') and
                              not uri?(str)
              error = true if feedopt == 'save_items?' and
                              not (str =~ /true/i or str =~ /false/i)
              error = true if feedopt == 'refresh' and
                              str.to_i < $config['feed_refresh_warn']
              if error  # bail if user entered nonsense via basic checks
                NcursesInterface::set_status($config['msg_bad_option'] % feedopt)
                return 1
              end

              case feedopt  # create options hash to pass to engine
              when 'save_items?'
                if str =~ /true/i: newopts = {feedopt => true}
                else newopts = {feedopt => false}; end
              when 'priority', 'refresh'
                newopts = {feedopt => str.to_i}
              when 'max_items'
                if str =~ /none|nil/i: newopts = {feedopt => nil}
                else newopts = {feedopt => str.to_i}; end
              when 'category'
                if str =~ /\bnone\b|\bnil\b/i: newopts = {feedopt => nil}
                else newopts = {feedopt => str}; end
              else newopts = {feedopt => str}
              end

              Engine::edit_feed($a_feed, newopts)  # change given option

              # update info and close edit window
              $wins[NcursesInterface::get_win_id('edit')].close(true)
              NcursesInterface::populate_feed_win
              NcursesInterface::set_status($config['msg_edit_success'])
              Key::edit_feed
            else  # if no change
              NcursesInterface::set_status('')
            end
          end