From 02fda3fdc2ccf7d3116ac06957c9914b8926bf8f Mon Sep 17 00:00:00 2001 From: cxxxr Date: Wed, 29 Nov 2023 21:08:54 +0900 Subject: [PATCH] fix for tests --- frontends/fake-interface/fake-interface.lisp | 32 ++++++++++++++++++++ src/interface.lisp | 6 +++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/frontends/fake-interface/fake-interface.lisp b/frontends/fake-interface/fake-interface.lisp index 49ebaebeb..1f9aa94d0 100644 --- a/frontends/fake-interface/fake-interface.lisp +++ b/frontends/fake-interface/fake-interface.lisp @@ -85,6 +85,38 @@ (defmethod lem-if:update-display ((implementation fake-interface))) +(defmethod lem-if:view-width ((implementation fake-interface) view) + (view-width view)) + +(defmethod lem-if:view-height ((implementation fake-interface) view) + (view-height view)) + +(defmethod lem-if:object-width ((implementation fake-interface) object) + 1) + +(defmethod lem-if:object-height ((implementation fake-interface) object) + 1) + +(defmethod lem-if:render-line ((implementation fake-interface) view x y objects height) + nil) + +(defmethod lem-if:clear-to-end-of-window ((implementation fake-interface) view y) + nil) + +(defmethod lem-if:get-char-width ((implementation fake-interface)) + 1) + +(defmethod lem-if:get-char-height ((implementation fake-interface)) + 1) + +(defmethod lem-if:render-line-on-modeline ((implementation fake-interface) + view + left-objects + right-objects + default-attribute + height) + nil) + (defmacro with-fake-interface (() &body body) `(with-implementation (make-instance 'fake-interface) (setup-first-frame) diff --git a/src/interface.lisp b/src/interface.lisp index bc999d5a2..fc0bde4e9 100644 --- a/src/interface.lisp +++ b/src/interface.lisp @@ -123,7 +123,11 @@ *implementation*) (defmacro with-implementation (implementation &body body) - `(let ((*implementation* ,implementation)) + `(let* ((*implementation* ,implementation) + (bt:*default-special-bindings* + (acons '*implementation* + *implementation* + bt:*default-special-bindings*))) ,@body)) (defun display-background-mode ()