aboutsummaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-12-28 18:58:24 +0100
committerbptato <nincsnevem662@gmail.com>2024-12-28 18:58:24 +0100
commit5881750f9db31489fb3b9f03e53bc80eba897234 (patch)
tree9f33ce795909b58d2953ada3975ce71897bcc2ac /src/server
parent3fdb9c9ccb1ff4eb6fd5b8fde2be3725eb618b4f (diff)
downloadchawan-5881750f9db31489fb3b9f03e53bc80eba897234.tar.gz
env: do not copy attrs, fix screen on client
Now screen.width etc. works in the pager too.
Diffstat (limited to 'src/server')
-rw-r--r--src/server/buffer.nim29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/server/buffer.nim b/src/server/buffer.nim
index 3012c639..ea6a0d94 100644
--- a/src/server/buffer.nim
+++ b/src/server/buffer.nim
@@ -884,7 +884,6 @@ proc processData(buffer: Buffer; iq: openArray[uint8]): bool =
proc windowChange*(buffer: Buffer; attrs: WindowAttributes) {.proxy.} =
buffer.attrs = attrs
buffer.prevStyled = nil
- buffer.window.attrs = attrs
buffer.reshape()
type UpdateHoverResult* = object
@@ -1934,20 +1933,20 @@ proc launchBuffer*(config: BufferConfig; url: URL; attrs: WindowAttributes;
charsetStack: charsetStack,
cacheId: -1,
outputId: -1,
- factory: factory,
- window: newWindow(
- config.scripting,
- config.images,
- config.styling,
- config.autofocus,
- attrs,
- factory,
- loader,
- url,
- urandom,
- config.imageTypes,
- config.userAgent
- )
+ factory: factory
+ )
+ buffer.window = newWindow(
+ config.scripting,
+ config.images,
+ config.styling,
+ config.autofocus,
+ addr buffer.attrs,
+ factory,
+ loader,
+ url,
+ urandom,
+ config.imageTypes,
+ config.userAgent
)
if buffer.config.scripting != smFalse:
buffer.window.navigate = proc(url: URL) = buffer.navigate(url)