about summary refs log tree commit diff stats
path: root/display.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-02-06 20:09:53 +0100
committerbptato <nincsnevem662@gmail.com>2021-02-06 20:09:53 +0100
commit424f52e1f2eff84ee23a79b38e7932c2918351ed (patch)
tree839ae6b1be3934a2c6b4b0fcaac444082174bc6f /display.nim
parent5dfffae926009defec5cc3ab170c645967c68f33 (diff)
downloadchawan-424f52e1f2eff84ee23a79b38e7932c2918351ed.tar.gz
removing old readline
Diffstat (limited to 'display.nim')
-rw-r--r--display.nim7
1 files changed, 3 insertions, 4 deletions
diff --git a/display.nim b/display.nim
index c7cd4bb4..4bf15921 100644
--- a/display.nim
+++ b/display.nim
@@ -158,8 +158,7 @@ proc postAlignNode(buffer: Buffer, node: HtmlNode, state: var RenderState) =
 
   if state.rawline.len > 0 and state.blanklines == 0:
     state.nextspaces += max(elem.margin, elem.marginright)
-    if node.closeblock and (node.isTextNode() or elem.numChildNodes == 0):
-      state.write($node.nodeAttr().tagType)
+    if node.closeblock and (node.isTextNode() or elem.childNodes.len == 0):
       buffer.flushLine(state)
 
   if node.closeblock:
@@ -355,7 +354,7 @@ proc inputLoop(attrs: TermAttributes, buffer: Buffer): bool =
         case selectedElem.get().tagType
         of TAG_INPUT:
           clearStatusMsg(buffer.height)
-          let status = readLine("TEXT:", HtmlInputElement(selectedElem.get()).value)
+          let status = readLine("TEXT: ", HtmlInputElement(selectedElem.get()).value, buffer.width)
           if status:
             reshape = true
             redraw = true
@@ -368,7 +367,7 @@ proc inputLoop(attrs: TermAttributes, buffer: Buffer): bool =
       var url = $buffer.document.location
 
       clearStatusMsg(buffer.height)
-      let status = readLine("URL:", url)
+      let status = readLine("URL: ", url, buffer.width)
       if status:
         buffer.setLocation(parseUri(url))
         return true