branch: elpa/forth-mode
commit fbd2c51cea940cc1da251b4b09fae53243cf426b
Author: Helmut Eller <[email protected]>
Commit: Lars Brinkhoff <[email protected]>

    Initialize pseudo terminal window size
    
    * (run-forth): Initialize the window size of the newly created
    process.  SwiftForth reads the size and crashes if it is zero.  So
    initialize to something non-zero even if it's not the correct size of
    the *forth* window.  There's probably still a race condition as we
    only set the window size after the subprocess has been started.
---
 forth-interaction-mode.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/forth-interaction-mode.el b/forth-interaction-mode.el
index 784ce45959..41b4186852 100644
--- a/forth-interaction-mode.el
+++ b/forth-interaction-mode.el
@@ -51,6 +51,8 @@
     (unless (comint-check-proc buffer)
       (run-hooks 'run-forth-hooks)
       (make-comint-in-buffer "forth" buffer forth-executable)
+      (set-process-window-size (get-buffer-process buffer)
+                              (window-width) (window-height))
       (set-process-sentinel (get-buffer-process buffer)
                            'forth-interaction-sentinel)
       (forth-interaction-mode)

Reply via email to