edit_feed (Raggle::Interfaces::NcursesInterface::Key)

    # File raggle, line 2468
            def Key::edit_feed
              id = NcursesInterface::get_win_id('edit')

              if id == -1  # new window
                w, h = $config['w'] - 15, 10  # get height/width
                feed = $config['feeds'].get($a_feed) rescue return

                # create window and add it to window list
                $wins << win = NcursesInterface::ListWindow::new({
                  'title'   => $config['msg_edit_title'],
                  'key'     => 'edit',
                  'coords'  => [7, 5, w, h],
                  'colors'  => $wins[NcursesInterface::get_win_id('item')].colors,
                })

                # build feed options list and draw
                %w{Title Category Priority URL Site Refresh Save_Items? Max_Items}.each { |key|
                  lowkey = key.downcase
                  len = feed[lowkey].to_s.length
                  maxlen = w - 7 - key.length
                  val = if len > maxlen  # must shorten
                          feed[lowkey].to_s[0..(maxlen - 3)] + '...'
                        else feed[lowkey].to_s
                  end
                  val = 'None' if feed[lowkey].nil?  # take care of empties
                  title = ' ' + key + ' '*(w - key.length - val.length - 4) + val
                  win.items << { 'title' => title, 'feedopt' => lowkey }
                }
                win.draw_items
                NcursesInterface::set_active_win(NcursesInterface::get_win_id('edit'))
              else
                if id == $a_win  # window open; toggle to closed
                  $wins[id].close(true)
                else  # window open but not selected; select it
                  NcursesInterface::set_active_win(id)
                end
              end
            end