Skip to content

Commit

Permalink
fix(launcher): Unlimit search results for file navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
mmstick committed Jun 30, 2021
1 parent 3f417b4 commit 7a2f36d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/dialog_launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ export class Launcher extends search.Search {

const pattern = pat.toLowerCase()

if (pat !== '?' && ! pat.startsWith("/") && ! pat.startsWith("~")) {
const navigating_files = pat.startsWith("/") || pat.startsWith("~")

if (pat !== '?' && ! navigating_files) {
const needles = pattern.split(' ');

const contains_pattern = (haystack: string, needles: Array<string>): boolean => {
Expand Down Expand Up @@ -207,7 +209,7 @@ export class Launcher extends search.Search {
this.options = windows.concat(this.options)

// Truncate excess items from the list
this.options.splice(this.list_max);
if (!navigating_files) this.options.splice(this.list_max);

return this.options;
};
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/recent/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ class App {
}

query(input) {
input = input.substring(2).trim()
input = input.trim()

const items = this.items()

let selections = new Array()
Expand All @@ -77,7 +77,7 @@ class App {
.slice(0, 20)

let id = 0

for (const item of this.results) {
selections.push({
name: item.display_name,
Expand Down

0 comments on commit 7a2f36d

Please sign in to comment.