aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gopkg.lock14
-rw-r--r--Gopkg.toml2
-rw-r--r--ui/fuzzy-search-modal.go12
-rw-r--r--vendor/github.com/renstrom/fuzzysearch/LICENSE (renamed from vendor/github.com/evidlo/fuzzysearch/LICENSE)0
-rw-r--r--vendor/github.com/renstrom/fuzzysearch/fuzzy/fuzzy.go (renamed from vendor/github.com/evidlo/fuzzysearch/fuzzy/fuzzy.go)2
-rw-r--r--vendor/github.com/renstrom/fuzzysearch/fuzzy/levenshtein.go (renamed from vendor/github.com/evidlo/fuzzysearch/fuzzy/levenshtein.go)0
6 files changed, 15 insertions, 15 deletions
diff --git a/Gopkg.lock b/Gopkg.lock
index b3fe680..9e6a213 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -15,12 +15,6 @@
[[projects]]
branch = "master"
- name = "github.com/evidlo/fuzzysearch"
- packages = ["fuzzy"]
- revision = "f6153b556daf86b90da85818544c8b498640759c"
-
-[[projects]]
- branch = "master"
name = "github.com/gdamore/encoding"
packages = ["."]
revision = "b23993cbb6353f0e6aa98d0ee318a34728f628b9"
@@ -51,6 +45,12 @@
[[projects]]
branch = "master"
+ name = "github.com/renstrom/fuzzysearch"
+ packages = ["fuzzy"]
+ revision = "500e0fce37a81072d9bf4ec1bf5d32f52c807282"
+
+[[projects]]
+ branch = "master"
name = "github.com/shurcooL/sanitized_anchor_name"
packages = ["."]
revision = "86672fcb3f950f35f2e675df2240550f2a50762f"
@@ -144,6 +144,6 @@
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
- inputs-digest = "a206fe41b10601a6e9cf402fc120084d48f589287882674baee54855ad513da1"
+ inputs-digest = "2a15ea883a6ee15a2274160ad22f40976519ca0a2d15c4412c04fb02e9a31223"
solver-name = "gps-cdcl"
solver-version = 1
diff --git a/Gopkg.toml b/Gopkg.toml
index fd31673..5927463 100644
--- a/Gopkg.toml
+++ b/Gopkg.toml
@@ -75,7 +75,7 @@
[[constraint]]
branch = "master"
- name = "github.com/evidlo/fuzzysearch"
+ name = "github.com/renstrom/fuzzysearch"
[prune]
go-tests = true
diff --git a/ui/fuzzy-search-modal.go b/ui/fuzzy-search-modal.go
index 5d75eaf..836f58e 100644
--- a/ui/fuzzy-search-modal.go
+++ b/ui/fuzzy-search-modal.go
@@ -21,7 +21,7 @@ import (
"sort"
"strconv"
- "github.com/evidlo/fuzzysearch/fuzzy"
+ "github.com/renstrom/fuzzysearch/fuzzy"
"maunium.net/go/gomuks/debug"
"maunium.net/go/gomuks/matrix/rooms"
"maunium.net/go/gomuks/ui/widget"
@@ -93,10 +93,10 @@ func (fs *FuzzySearchModal) changeHandler(str string) {
sort.Sort(fs.matches)
fs.results.Clear()
for _, match := range fs.matches {
- fmt.Fprintf(fs.results, `["%d"]%s[""]%s`, match.Index, match.Target, "\n")
+ fmt.Fprintf(fs.results, `["%d"]%s[""]%s`, match.OriginalIndex, match.Target, "\n")
}
fs.parent.Render()
- fs.results.Highlight(strconv.Itoa(fs.matches[0].Index))
+ fs.results.Highlight(strconv.Itoa(fs.matches[0].OriginalIndex))
fs.results.ScrollToBeginning()
} else {
fs.results.Clear()
@@ -116,15 +116,15 @@ func (fs *FuzzySearchModal) keyHandler(event *tcell.EventKey) *tcell.EventKey {
// Cycle highlighted area to next match
if len(highlights) > 0 {
fs.selected = (fs.selected + 1) % len(fs.matches)
- fs.results.Highlight(strconv.Itoa(fs.matches[fs.selected].Index))
+ fs.results.Highlight(strconv.Itoa(fs.matches[fs.selected].OriginalIndex))
fs.results.ScrollToHighlight()
}
return nil
case tcell.KeyEnter:
// Switch room to currently selected room
if len(highlights) > 0 {
- debug.Print("Fuzzy Selected Room:", fs.roomList[fs.matches[fs.selected].Index].GetTitle())
- fs.mainView.SwitchRoom(fs.roomList[fs.matches[fs.selected].Index].Tags()[0].Tag, fs.roomList[fs.matches[fs.selected].Index])
+ debug.Print("Fuzzy Selected Room:", fs.roomList[fs.matches[fs.selected].OriginalIndex].GetTitle())
+ fs.mainView.SwitchRoom(fs.roomList[fs.matches[fs.selected].OriginalIndex].Tags()[0].Tag, fs.roomList[fs.matches[fs.selected].OriginalIndex])
}
fs.parent.views.RemovePage("fuzzy-search-modal")
fs.parent.app.SetFocus(fs.parent.views)
diff --git a/vendor/github.com/evidlo/fuzzysearch/LICENSE b/vendor/github.com/renstrom/fuzzysearch/LICENSE
index 9cc7533..9cc7533 100644
--- a/vendor/github.com/evidlo/fuzzysearch/LICENSE
+++ b/vendor/github.com/renstrom/fuzzysearch/LICENSE
diff --git a/vendor/github.com/evidlo/fuzzysearch/fuzzy/fuzzy.go b/vendor/github.com/renstrom/fuzzysearch/fuzzy/fuzzy.go
index 163bc92..76b1c6e 100644
--- a/vendor/github.com/evidlo/fuzzysearch/fuzzy/fuzzy.go
+++ b/vendor/github.com/renstrom/fuzzysearch/fuzzy/fuzzy.go
@@ -158,7 +158,7 @@ type Rank struct {
Distance int
// Location of Target in original list
- Index int
+ OriginalIndex int
}
type Ranks []Rank
diff --git a/vendor/github.com/evidlo/fuzzysearch/fuzzy/levenshtein.go b/vendor/github.com/renstrom/fuzzysearch/fuzzy/levenshtein.go
index 237923d..237923d 100644
--- a/vendor/github.com/evidlo/fuzzysearch/fuzzy/levenshtein.go
+++ b/vendor/github.com/renstrom/fuzzysearch/fuzzy/levenshtein.go