From a6d1f45be871df3cfd3cc76b1418324f8fef7727 Mon Sep 17 00:00:00 2001 From: sloumdrone Date: Tue, 10 Sep 2019 20:23:44 -0700 Subject: [PATCH] Added clarifying comments --- client.go | 2 ++ cui/cui.go | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/client.go b/client.go index bd4719e..4773435 100644 --- a/client.go +++ b/client.go @@ -449,6 +449,8 @@ func (c *client) goToLink(l string) { } func (c *client) Visit(url string) { + // TODO both gemini and gopher should return a string + // The wrap lines function in cui needs to be rewritten u, err := MakeUrl(url) if err != nil { c.SetMessage(err.Error(), true) diff --git a/cui/cui.go b/cui/cui.go index a784ce7..b00e07e 100644 --- a/cui/cui.go +++ b/cui/cui.go @@ -85,6 +85,12 @@ func Clear(dir string) { // than the specified console width, splitting them over two lines. returns the // amended document content as a slice. func wrapLines(s []string, consolewidth int) []string { + // TODO redo this so that it returns a string and can hard and + // soft wrap. It will use parsing to go char by char. CUI should + // set tabs to 4 on screen init. Multispace chars should be detected + // tab spacing should be detected using % to see where the next tab stop + // is. Use a counter as building the sub buffer. len returns num of bytes + // be sure to get num of chars instead: len([]rune("a")). indent := " " //11 spaces out := []string{} for _, ln := range s {