Revert "Add search-highlight-all option"
There's a better solution: Calling the function twice, once with highlight,
once with mark.
This reverts commit 8812672d7d
.
This commit is contained in:
parent
6d0db2af00
commit
4ade32777d
@ -66,18 +66,13 @@ class SearchManager(QObject):
|
||||
do_search: If a search should be started.
|
||||
"""
|
||||
if self._text is not None and self._text != text:
|
||||
flags = 0
|
||||
if config.get('general', 'search-highlight-all'):
|
||||
flags |= QWebPage.HighlightAllOccurrences
|
||||
self.do_search.emit('', flags)
|
||||
self.do_search.emit('', 0)
|
||||
self._text = text
|
||||
self._flags = 0
|
||||
if not config.get('general', 'ignore-case'):
|
||||
self._flags |= QWebPage.FindCaseSensitively
|
||||
if config.get('general', 'wrap-search'):
|
||||
self._flags |= QWebPage.FindWrapsAroundDocument
|
||||
if config.get('general', 'search-highlight-all'):
|
||||
self._flags |= QWebPage.HighlightAllOccurrences
|
||||
if rev:
|
||||
self._flags |= QWebPage.FindBackward
|
||||
self.do_search.emit(self._text, self._flags)
|
||||
@ -110,9 +105,6 @@ class SearchManager(QObject):
|
||||
Emit:
|
||||
do_search: If a search should be started.
|
||||
"""
|
||||
if config.get('general', 'search-highlight-all'):
|
||||
raise CommandError("search-next doesn't work when "
|
||||
"search-highlight-all is enabled!")
|
||||
if self._text is not None:
|
||||
for _ in range(count):
|
||||
self.do_search.emit(self._text, self._flags)
|
||||
@ -127,9 +119,6 @@ class SearchManager(QObject):
|
||||
Emit:
|
||||
do_search: If a search should be started.
|
||||
"""
|
||||
if config.get('general', 'search-highlight-all'):
|
||||
raise CommandError("search-prev doesn't work when "
|
||||
"search-highlight-all is enabled!")
|
||||
if self._text is None:
|
||||
return
|
||||
# The int() here serves as a QFlags constructor to create a copy of the
|
||||
|
@ -177,10 +177,6 @@ DATA = OrderedDict([
|
||||
SettingValue(types.Bool(), 'true'),
|
||||
"Whether to wrap search to the top when arriving at the end."),
|
||||
|
||||
('search-highlight-all',
|
||||
SettingValue(types.Bool(), 'true'),
|
||||
"Whether to highlight all search matches."),
|
||||
|
||||
('startpage',
|
||||
SettingValue(types.List(), 'http://www.duckduckgo.com'),
|
||||
"The default page(s) to open at the start, separated by commas."),
|
||||
|
Loading…
Reference in New Issue
Block a user