mirror of https://github.com/chzyer/readline.git
e06700a8ff
These functions would bypass calling RuneBuffer.Refresh when Terminal.IsReading(), but this leads to a race condition when another goroutine is just beginning to read. The result is that the prompt is not erased or rewritten in some cases. RuneBuffer.Refresh protects this with a mutex, and looks safe to call even when !IsReading(), so removing these redundant checks seems sufficient. The tested scenario is to have goroutine A calling Readline in a loop and handling commands, and goroutine B periodically printing to Instance.Stdout(). If the print in B is timed just before A calls Readline, the printed line is displayed after the prompt and the prompt is not reprinted until the next input. |
||
---|---|---|
doc | ||
example | ||
runes | ||
.travis.yml | ||
CHANGELOG.md | ||
LICENSE | ||
README.md | ||
ansi_windows.go | ||
complete.go | ||
complete_helper.go | ||
complete_segment.go | ||
complete_segment_test.go | ||
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_solaris.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
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]