From 465102481783b29fe6cb0ecddae33ca1147226b8 Mon Sep 17 00:00:00 2001 From: shaoying Date: Thu, 10 Jan 2019 20:18:03 +0800 Subject: [PATCH] fix nfs.Read Ctrl+H --- src/contexts/nfs/nfs.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/contexts/nfs/nfs.go b/src/contexts/nfs/nfs.go index bc3f6917..8aa52ed6 100644 --- a/src/contexts/nfs/nfs.go +++ b/src/contexts/nfs/nfs.go @@ -448,6 +448,9 @@ func (nfs *NFS) Read(p []byte) (n int, err error) { case termbox.KeyCtrlL: nfs.Term(m, "clear", "all").Term(m, "flush") nfs.prompt(what) + if len(what) < index { + index = 0 + } nfs.shadow(what[index:], help, color) case termbox.KeyCtrlJ, termbox.KeyEnter: