peterh / liner

Pure Go line editor with history, inspired by linenoise
MIT License
1.04k stars 132 forks source link

Support multiline editing #55

Closed pires closed 8 years ago

pires commented 8 years ago

For instance, to be used in https://github.com/influxdb/influxdb/issues/4279.

flisky commented 8 years ago

I'm working on it, and a PR is coming in a few hours:)

peterh commented 8 years ago

I consider multi-line editing to be out of scope for liner, but maybe I'll be amazed by your patch. I look forward to seeing it.

Don't forget to test Linux (with TERM=xterm), Linux (with TERM=dumb) and Windows.

peterh commented 8 years ago

And, since I was just looking at it, don't forget to test history saving/loading (which uses \n as a delimiter).

flisky commented 8 years ago

PR #59. Will self review the code and do more tests soon.

I take more care on double width char, because I use English and Chinese both.

Any suggestion is welcome, specifically on the variable naming, which bother me much:)