mirror of
https://github.com/asciimoo/wuzz
synced 2024-11-10 13:10:29 +00:00
Merge pull request #45 from georgijd/reset-cursors-on-new-req
Reset cursors before each request
This commit is contained in:
commit
672d90209d
7
wuzz.go
7
wuzz.go
@ -414,6 +414,9 @@ func (a *App) SubmitRequest(g *gocui.Gui, _ *gocui.View) error {
|
||||
header_str += fmt.Sprintf("\x1b[0;33m%v:\x1b[0;0m %v\n", hname, strings.Join(response.Header[hname], ","))
|
||||
}
|
||||
fmt.Fprint(vrh, header_str)
|
||||
if _, err := vrh.Line(0); err != nil {
|
||||
vrh.SetOrigin(0, 0)
|
||||
}
|
||||
r.ResponseHeaders = header_str
|
||||
return nil
|
||||
})
|
||||
@ -444,8 +447,12 @@ func (a *App) PrintBody(g *gocui.Gui) {
|
||||
} else {
|
||||
vrb.Write(req.RawResponseBody)
|
||||
}
|
||||
if _, err := vrb.Line(0); err != nil {
|
||||
vrb.SetOrigin(0, 0)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
vrb.SetOrigin(0, 0)
|
||||
search_re, err := regexp.Compile(search_text)
|
||||
if err != nil {
|
||||
fmt.Fprint(vrb, "Error: invalid search regexp")
|
||||
|
Loading…
Reference in New Issue
Block a user