atom-julia-client icon indicating copy to clipboard operation
atom-julia-client copied to clipboard

Cannot edit long commands properly in REPL

Open BoundaryValueProblems opened this issue 6 years ago • 3 comments

I have trouble editing some previously-used commands in REPL window now under atom-julia-client 0.6.10 under atom 1.25.1. Suppose I use the uparrow key to go through my command history and find a particular command that I want to edit and use with different parameters. Then, I have quite difficulty to edit that line (or command) now if that command line has more than 80 characters. For example, Ctrl-e does not reach the end of the command, and the delete key behaves also badly. For shorter commands, things work as before. But I just started having this problem recently. Things were OK in late January. Thanks for your help!

BoundaryValueProblems avatar Apr 09 '18 16:04 BoundaryValueProblems

Yeah, this is a known problem (which has been around since the new REPL was introduced), though I didn't find an open issue for it. There are actually two issues here:

  1. Console width isn't computed correctly initially, which means you get linewrapping at 80 chars (this seems to be a windows only issue). You can get around it by resizing the REPL tab once.
  2. When a input line wraps around and you try to edit that, the prompt will eat the history above it. This is due to a difference in behaviour between the terminal emulator we use here and cmd, which causes an off-by-one error. This can be fixed with a patched OhMyREPL installation (or by changing the relevant code in Base and rebuilding, if you're so inclined).

pfitzseb avatar Apr 09 '18 17:04 pfitzseb

Thanks a lot, @pfitzseb , for our feedback. I'm curious. In language-julia package (ver. 0.16.0), there are two items I could turn on/off: 1) Soft Wrap; and 2) Soft Wrap At Preferred Length. Do those items affect the editing behavior of long command lines?

BoundaryValueProblems avatar Apr 09 '18 19:04 BoundaryValueProblems

No, the REPL isn't influenced by those options at all. This isn't something you can work around yourself except for using OhMyREPL and changing this line to miscountnl = false.

pfitzseb avatar Apr 09 '18 19:04 pfitzseb