Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ed_setup: do not return prematurely (re: e5c1a73)
This incorrect thing jumped out when reading the code: when ed_setup needs to fall back to malloc to allocate the output buffer instead of using the Sfio stream buffer, it returns prematurely, before handlign reedit (the histreedit shell option) and e_default (the -v option to 'read'). Instead of returning, wrap the normal way of reserving the Sfio buffer in an 'else' so that ed_setup continues correctly either way. To understand the else clause code, see the manual: $ man src/lib/libast/man/sfio.3 See under sfreserve(), 'type == SFIO_LOCKR'.
- Loading branch information