Skip to content
This repository was archived by the owner on Jan 27, 2023. It is now read-only.

Commit 6d495d7

Browse files
Update changelog
1 parent e2c51ed commit 6d495d7

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog for SearchInProject
22

3+
## v1.7.1 2016-08-14
4+
5+
* Trim longs lines in results so Sublime Text doesn't hang #20 (thanks to @kojoru)
6+
37
## v1.7.0 2015-08-07
48

59
* Support The Platinum Searcher (thanks to @jodaka)

search_in_project.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828

2929

3030
class SearchInProjectCommand(sublime_plugin.WindowCommand):
31+
32+
# Used to trim lines for the results quick panel. Without trimming Sublime Text
33+
# *will* hang on long lines - often encountered in minified Javascript, for example.
34+
MAX_RESULT_LINE_LENGTH = 1000
35+
3136
def __init__(self, window):
3237
sublime_plugin.WindowCommand.__init__(self, window)
3338
self.last_search_string = ''
@@ -60,7 +65,7 @@ def perform_search(self, text):
6065
try:
6166
self.results = self.engine.run(text, folders)
6267
if self.results:
63-
self.results = [[result[0].replace(self.common_path.replace('\"', ''), ''), result[1][:1000]] for result in self.results]
68+
self.results = [[result[0].replace(self.common_path.replace('\"', ''), ''), result[1][:self.MAX_RESULT_LINE_LENGTH]] for result in self.results]
6469
self.results.append("``` List results in view ```")
6570
self.window.show_quick_panel(self.results, self.goto_result)
6671
else:

0 commit comments

Comments
 (0)