Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Evaluate selection" is not handling text correctly #1663

Open
patrick-nicodemus opened this issue Nov 26, 2024 · 1 comment
Open

"Evaluate selection" is not handling text correctly #1663

patrick-nicodemus opened this issue Nov 26, 2024 · 1 comment

Comments

@patrick-nicodemus
Copy link

patrick-nicodemus commented Nov 26, 2024

When I select text in a window and use the "Evaluate selection" command, not all text in the selection is sent to utop.

The observed behavior seems to be something like:

  1. Take up to the next 50 characters from the selected region into a buffer, stopping if you reach the end of the selected region
  2. If the buffer contains the end of the phrase, send the entire buffer to utop and stop. Otherwise go to step 1

This behavior doesn't make a lot of sense to me. Either it should send the entire selection to utop, or it should only send the first complete phrase from the selected region. In the following code, for example,

let aa = 1;;
let bb = 2;;
let cc = 3;;
let ddd = 4;;

it sends the first 50 characters and stops, so what utop actually receives is

let aa = 1;;
let bb = 2;;
let cc = 3;;
let ddd = 4

Or, if the first phrase is, say, 70 characters, and the next phrase is also 70 characters, then if I select both phrases, it will send 100 characters and stop.

I am using OCaml through WSL2 if this is relevant.

@smorimoto
Copy link
Collaborator

CC: @tmattio @ulugbekna

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants