Skip to content

"Evaluate selection" is not handling text correctly #1663

Description

@patrick-nicodemus

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions