mirror of https://github.com/chzyer/readline.git
62ab2cfd17
Introduce a new operation.isPrompting field which is true from when a prompt has been written until data is returned to the caller. When Write is called on the wrapWriter to write to stdout or stderr, check if we are currently prompting the user for input and if so clean up the prompt and write the data before redrawing the prompt at its new location after the written data. Previously terminal.IsReading() was used for this, but this had various race conditions and it was not correct to check this field to make prompt and buffer redrawing decisions. In turn, I removed all the isReading code also. The old isReading() check was actually checking if the terminal goroutine was actively waiting for more input. |
||
---|---|---|
doc | ||
example | ||
runes | ||
.gitignore | ||
.travis.yml | ||
CHANGELOG.md | ||
LICENSE | ||
README.md | ||
ansi_windows.go | ||
complete.go | ||
complete_helper.go | ||
complete_segment.go | ||
complete_segment_test.go | ||
go.mod | ||
go.sum | ||
history.go | ||
operation.go | ||
password.go | ||
rawreader_windows.go | ||
readline.go | ||
readline_test.go | ||
remote.go | ||
runebuf.go | ||
runes.go | ||
runes_test.go | ||
search.go | ||
std.go | ||
std_windows.go | ||
term.go | ||
term_bsd.go | ||
term_linux.go | ||
term_nosyscall6.go | ||
term_unix.go | ||
term_windows.go | ||
terminal.go | ||
utils.go | ||
utils_test.go | ||
utils_unix.go | ||
utils_windows.go | ||
vim.go | ||
windows_api.go |
README.md
A powerful readline library in Linux
macOS
Windows
Solaris
AIX
Guide
Repos using readline
Feedback
If you have any questions, please submit a github issue and any pull requests is welcomed :)
Backers
Love Readline? Help me keep it alive by donating funds to cover project expenses!
[Become a backer]
Sponsors
Become a sponsor and get your logo here on our Github page. [Become a sponsor]