Skip to content

Sometimes, "Send the whole current file to the REPL" sends only the initial lines of code after the REPL is closed. #5

Closed
@vagreargnatry

Description

@vagreargnatry

Thank you to the author for creating this fantastic software. It has helped me write Scheme code more comfortably. But I still have some questions below.

Describe the bug
The content of the file is as follows. When using Send the whole current file to the REPL the code appearing in the REPL is missing the initial lines (the number of missing lines seems to be related to the number of characters in the preceding lines).

(define (fact n) (cond [(< n 1) "error"] [(= n 1) 1] [else (* n (fact (sub1 n)))]))

(define (fact-iter n)
  (define (iter cnt acc)
    (if (= cnt 1)
    acc
    (iter (sub1 cnt) (* cnt acc))))
  (cond
    [(< n 1) "error"]
    [else (iter n 1)]))

(define (counter state)
  (lambda (info)
    (cond
     [(eq? info 'add1) (set! state (add1 state))]
     [(eq? info 'sub1) (set! state (sub1 state))]
     [(eq? info 'get) state]
     [(eq? info 'reset) (set! state 0)]
     [else "error"])))

To Reproduce
Steps to reproduce the behavior:

  1. Use Powershell 7.3.4 or GNU bash, version 5.2.15(1)-release (x86_64-pc-msys) or Powershell 5.1.22621.1778 as VS Code default terminal.
  2. Open the file.
  3. Use Send the whole current file to the REPL

Expected behavior
The file content can be sent to the REPL all at once, ensuring that all the code is executed correctly.

Screenshots
Powershell 7.3.4
powershell
Git Bash
git-bash
Command Prompt (cmd)
cmd

Logs

Chez Scheme REPL starting.
Registered all commands
Extension startup finished.
Sent to REPL using command chezScheme.sendSelectionToREPL
Sent to REPL using command chezScheme.sendSelectionToREPL
Sent to REPL using command chezScheme.sendSelectionToREPL

Environment (please complete the following information):

  • Version of the extension: v0.2.0
  • Version of VS Code: 1.79.2 (user setup)
  • OS: Windows 11 22H2

Additional context
When using cmd (Command Prompt) as VS Code's default terminal, there is no such issue.
This issue may not occur consistently, but it seems to be happening frequently in my case.

This issue will also make "Send selected s-expression to the REPL" unavailable.
4

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions