Skip to content

Commit

Permalink
search with space/tab
Browse files Browse the repository at this point in the history
  • Loading branch information
xt0fer committed Nov 27, 2018
1 parent 16d082c commit 03ba6a0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"os"

"tioga.co/kristofer/kg"
"github.com/kristofer/kg"
)

func main() {
Expand Down
4 changes: 4 additions & 0 deletions editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,10 @@ loop:
}
if ev.Ch == 0 {
switch ev.Key {
case termbox.KeyTab:
fname = fname + string('\t')
case termbox.KeySpace:
fname = fname + string(' ')
case termbox.KeyEnter, termbox.KeyCtrlR:
break loop
case termbox.KeyBackspace2, termbox.KeyBackspace:
Expand Down
2 changes: 1 addition & 1 deletion search.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func (e *Editor) rsearch() {
func (e *Editor) displaySearchResult(found int, dir int, prompt string, search string) {
if found != -1 {
e.CurrentBuffer.SetPoint(found)
e.msg("%s/%s", prompt, search)
//e.msg("not found")
e.Display(e.CurrentWindow, true)
} else {
e.msg("Failing %s%s", prompt, search)
Expand Down

0 comments on commit 03ba6a0

Please sign in to comment.