Pass the typed download filter as an argument, not command text

A pattern containing '}' closed the match command early and ran the rest as commands.
This commit is contained in:
xirvik
2026-09-19 02:41:26 +00:00
committed by Jari Sundell
parent 7916e6022f
commit 3652329e2d
5 changed files with 115 additions and 8 deletions
+9
View File
@@ -1,6 +1,9 @@
#ifndef RTORRENT_UI_DOWNLOAD_LIST_H
#define RTORRENT_UI_DOWNLOAD_LIST_H
#include <string>
#include <torrent/object.h>
#include "element_base.h"
#include "globals.h"
#include "display/manager.h"
@@ -29,6 +32,12 @@ namespace ui {
class Download;
// Wrap a user-typed download name pattern in the anchors 'match' expects.
std::string create_filter_pattern(const std::string& input);
// Build the 'match' command the temporary view filter runs against d.name.
torrent::Object create_filter_command(const std::string& pattern);
class DownloadList : public ElementBase {
public:
typedef display::WindowDownloadList WList;