about summary refs log tree commit diff stats
path: root/src/local
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-02-27 18:45:17 +0100
committerbptato <nincsnevem662@gmail.com>2024-02-27 18:45:17 +0100
commit0f2c08006a8787fc1a8a67ecf125fdffadd245ff (patch)
tree77db5c898bf8f55835466efa175342fa42a32f01 /src/local
parent5c978a3441cec24f2ffbd11b6e6bb3e2f429aadf (diff)
downloadchawan-0f2c08006a8787fc1a8a67ecf125fdffadd245ff.tar.gz
misc refactorings
* rename buffer enums
* fix isAscii for char 0x80
* remove dead code from URL
Diffstat (limited to 'src/local')
-rw-r--r--src/local/container.nim10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/local/container.nim b/src/local/container.nim
index c4427ec6..7641b6d9 100644
--- a/src/local/container.nim
+++ b/src/local/container.nim
@@ -443,7 +443,7 @@ func getHoverText*(container: Container): string =
       return container.hovertext[t]
 
 func isHoverURL*(container: Container, url: URL): bool =
-  let hoverurl = parseURL(container.hovertext[HOVER_LINK])
+  let hoverurl = parseURL(container.hovertext[htLink])
   return hoverurl.isSome and url.host == hoverurl.get.host
 
 proc triggerEvent(container: Container, event: ContainerEvent) =
@@ -499,9 +499,9 @@ proc sendCursorPosition*(container: Container) =
   container.iface.updateHover(container.cursorx, container.cursory)
       .then(proc(res: UpdateHoverResult) =
     if res.link.isSome:
-      container.hovertext[HOVER_LINK] = res.link.get
+      container.hovertext[htLink] = res.link.get
     if res.title.isSome:
-      container.hovertext[HOVER_TITLE] = res.title.get
+      container.hovertext[htTitle] = res.title.get
     if res.link.isSome or res.title.isSome:
       container.triggerEvent(STATUS)
     if res.repaint:
@@ -1541,10 +1541,10 @@ proc peekCursor(container: Container) {.jsfunc.} =
     container.lastpeek = low(HoverType)
 
 func hoverLink(container: Container): string {.jsfget.} =
-  return container.hovertext[HOVER_LINK]
+  return container.hovertext[htLink]
 
 func hoverTitle(container: Container): string {.jsfget.} =
-  return container.hovertext[HOVER_TITLE]
+  return container.hovertext[htTitle]
 
 proc handleCommand(container: Container) =
   var packetid, len: int