about summary refs log tree commit diff stats
path: root/src/main.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-08-06 17:38:40 +0200
committerbptato <nincsnevem662@gmail.com>2021-08-06 17:38:40 +0200
commit56b308e71f20dd6563634867e698e5c8d3290f58 (patch)
tree0cebb2740f344ad4f2262ccb3f5fff4e58e9c16d /src/main.nim
parent6d50a0f7d1af3da77fcea7290ac02a43e8f454e4 (diff)
downloadchawan-56b308e71f20dd6563634867e698e5c8d3290f58.tar.gz
Refactor display.nim and twtio.nim
Diffstat (limited to 'src/main.nim')
-rw-r--r--src/main.nim6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main.nim b/src/main.nim
index 8394b5ab..198eedb8 100644
--- a/src/main.nim
+++ b/src/main.nim
@@ -8,7 +8,6 @@ import utils/eprint
 import html/dom
 import html/htmlparser
 
-import io/display
 import io/buffer
 import io/term
 
@@ -47,11 +46,10 @@ proc main*() =
   let buffer = newBuffer(attrs)
   let uri = parseUri(paramStr(1))
   buffers.add(buffer)
-  buffer.renderPlainText(getPageUri(uri).readAll())
   #buffer.document = parseHtml(getPageUri(uri))
   #buffer.setLocation(uri)
   #buffer.document.applyDefaultStylesheet()
-  #buffer.renderHtml()
+  buffer.renderPlainText(getPageUri(uri).readAll())
   var lastUri = uri
   while displayPage(attrs, buffer):
     statusMsg("Loading...", buffer.height)
@@ -64,6 +62,6 @@ proc main*() =
         discard
       else:
         buffer.document = parseHtml(getPageUri(buffer.location))
-      buffer.renderHtml()
+      buffer.renderPlainText(getPageUri(uri).readAll())
     lastUri = newUri
 main()