utop icon indicating copy to clipboard operation
utop copied to clipboard

`M-d` (aka `Alt-d`) key-binding (`kill-next-word`) crashes utop

Open frou opened this issue 1 year ago • 2 comments

To reproduce:

  1. Type hello world at the utop prompt
  2. Move the text cursor to before the w.
  3. Press M-d (aka Alt-d) to try to delete the word world
  4. utop crashes:
Fatal error: exception Zed_rope.Out_of_bounds
Raised at Zed_rope.sub in file "src/zed_rope.ml", line 273, characters 4-23
Called from Zed_edit.kill_next_word in file "src/zed_edit.ml", line 728, characters 35-94
Called from LTerm_read_line.term#exec in file "src/lTerm_read_line.ml", line 1309, characters 8-31
Called from LTerm_read_line.term#process_keys in file "src/lTerm_read_line.ml", line 1158, characters 4-20
Called from LTerm_read_line.term#loop.(fun) in file "src/lTerm_read_line.ml", line 1189, characters 10-33
Called from Lwt.Sequential_composition.bind.create_result_promise_and_callback_if_deferred.callback in file "src/core/lwt.ml", line 1849, characters 23-26
Re-raised at Lwt.Miscellaneous.poll in file "src/core/lwt.ml", line 3077, characters 20-29
Called from Lwt_main.run.run_loop in file "src/unix/lwt_main.ml", line 31, characters 10-20
Called from Lwt_main.run in file "src/unix/lwt_main.ml", line 118, characters 8-13
Re-raised at Lwt_main.run in file "src/unix/lwt_main.ml", line 124, characters 4-13
Called from UTop_main.loop in file "src/lib/uTop_main.ml", line 814, characters 4-468
Called from UTop_main.main_aux in file "src/lib/uTop_main.ml", line 1630, characters 8-17
Called from UTop_main.main_internal in file "src/lib/uTop_main.ml", line 1646, characters 4-25

ocaml 4.14 utop 2.10.0 lambda-term 3.3.1 zed 3.2.0

frou avatar Sep 28 '22 10:09 frou

This is an issue in zed, I filed https://github.com/ocaml-community/zed/issues/49 for it.

emillon avatar Sep 29 '22 09:09 emillon

Thank you. It seems like there are several word-related issues going at different levels (there's also this: https://github.com/ocaml-community/lambda-term/issues/112)

frou avatar Sep 29 '22 09:09 frou