Run goimports
This commit is contained in:
parent
050e78b823
commit
f3212afbf7
|
@ -1,6 +1,6 @@
|
|||
package main
|
||||
|
||||
import "github.com/c-bata/go-prompt-toolkit/prompt"
|
||||
import "github.com/c-bata/go-prompt-toolkit"
|
||||
|
||||
func main() {
|
||||
l := 20
|
||||
|
@ -11,7 +11,6 @@ func main() {
|
|||
out.WriteStr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
|
||||
}
|
||||
|
||||
|
||||
out.CursorGoTo(5, 10)
|
||||
out.EraseLine()
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"syscall"
|
||||
|
||||
"github.com/c-bata/go-prompt-toolkit/prompt"
|
||||
"github.com/c-bata/go-prompt-toolkit"
|
||||
"github.com/pkg/term/termios"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package main
|
||||
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
|
|
@ -64,5 +64,3 @@ func FilterContains(completions []string, sub string, ignoreCase bool) []string
|
|||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ func defaultHandler(ac *ASCIICode, buffer *Buffer) {
|
|||
break
|
||||
case ControlT:
|
||||
break
|
||||
return
|
||||
case Up:
|
||||
break
|
||||
case Down:
|
||||
|
|
|
@ -89,7 +89,7 @@ func (r *Render) renderCompletion(buf *Buffer, words []string, max uint16, selec
|
|||
d := (len(r.prefix) + len(buf.Document().TextBeforeCursor())) % int(r.col)
|
||||
if d == 0 { // the cursor is on right end.
|
||||
r.out.CursorBackward(width)
|
||||
} else if d + width > int(r.col) {
|
||||
} else if d+width > int(r.col) {
|
||||
r.out.CursorBackward(d + width - int(r.col))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue