This patch to elogapply() silences "elogapply: can't happen ..." messages
that occur under the following somewhat rare circumstance:
1. a text selection near the end of file,
2. a command is executed that replaces the selected text, and
3. the length of the replacement text is sufficiently smaller than the selection.
This can result in the saved 'q0'/'q1' value exceeding the new buffer cache length,
even though the textdelete call did the right thing.
The proposed change updates 'q0' and 'q1' after the call to textdelete under "case
Delete". It doesn't appear to break anything, but I am by no means a 'power'
acme user, so further investigation would be prudent. "Case Replace" may also
require some fiddling but I couldn't figure out how to exercise that case.
|