summaryrefslogtreecommitdiff
path: root/qutebrowser/completion
diff options
context:
space:
mode:
authorAndrew MacFie <amacfie@sent.com>2021-01-19 15:07:04 -0500
committerAndrew MacFie <amacfie@sent.com>2021-01-19 15:07:04 -0500
commit3b3529db7a51903700c55ca6cc688e6580954c89 (patch)
treed113d8f2c1a19078ad1d35e63e6f0c5fb833c5dc /qutebrowser/completion
parenta12378a31d88368194d66acb293c9bb3d0030c0b (diff)
downloadqutebrowser-3b3529db7a51903700c55ca6cc688e6580954c89.tar.gz
qutebrowser-3b3529db7a51903700c55ca6cc688e6580954c89.zip
Add favorite_paths as setting
Diffstat (limited to 'qutebrowser/completion')
-rw-r--r--qutebrowser/completion/models/filepathcategory.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/qutebrowser/completion/models/filepathcategory.py b/qutebrowser/completion/models/filepathcategory.py
index 9f60d9841..5e73b6775 100644
--- a/qutebrowser/completion/models/filepathcategory.py
+++ b/qutebrowser/completion/models/filepathcategory.py
@@ -24,6 +24,8 @@ from typing import Any, List
from PyQt5.QtCore import QAbstractListModel, QModelIndex, QObject, Qt, QUrl
+from qutebrowser.config import config
+
class FilePathCategory(QAbstractListModel):
"""Represent filesystem paths matching a pattern."""
@@ -44,8 +46,7 @@ class FilePathCategory(QAbstractListModel):
return str(head / Path(path).relative_to(Path(head).expanduser()))
if not val:
- # TODO: give list of favorite paths from config
- self._paths = []
+ self._paths = config.val.completion.favorite_paths or []
elif val.startswith('file:///'):
glob_str = QUrl(val).toLocalFile() + '*'
self._paths = sorted(QUrl.fromLocalFile(path).toString()