Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly handle multi-line strings and newline returned by readline()
Fix for #138 According to https://lists.gnu.org/archive/html/bug-readline/2024-01/msg00000.html it's OK for readline() to return multi-line strings and/or newlines in case of bracketed paste (enabled by default since readline 8.1) and also in other situations even though its documentation explicitly states the opposite. So we need to handle this properly in calc instead of just using the first line and dropping the rest: Split the string returned by readline() into lines and return line by line with each invocation of hist_getline(), each possbily adding a terminating newline.
- Loading branch information
Martin Buck
committed
Jan 5, 2024
1 parent
2969502
commit 43fc022
Showing
1 changed file
with
56 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters