MasonProtter / ReplMaker.jl

Simple API for building repl modes in Julia
Other
134 stars 14 forks source link

Fix current buffer copying in `enter_mode!` #25

Closed fingolfin closed 2 years ago

fingolfin commented 2 years ago

The two argument version of enter_mode! is intended to allow REPL modes to work like Julia's builtin REPL modes: when there is already partial input on the prompt, and the user switches the mode, then the partial input is carried forward to the new REPL mode.

However, the copy was done too late, in default_trans_action() instead of before that closure is created and control handed off to LineEdit. This seems to have been broken since a refactoring in August 2019.

MasonProtter commented 2 years ago

Sorry for the delay with these PRs! thank you very much for all of these, I'll be reviewing them today!

MasonProtter commented 2 years ago

Looks good!