diff options
author | Russ Cox <rsc@swtch.com> | 2014-06-03 00:16:48 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2014-06-03 00:16:48 -0400 |
commit | 50ababbd552abfa8ef3b16ccdaea54b58f5c031c (patch) | |
tree | 7db6002fe4d701dda92ce43fba253ee1db210356 /font/naga10/knj10B.5005 | |
parent | 6400c9f20c3cdab491cd2aec29cfd2ae632d5046 (diff) | |
download | plan9port-50ababbd552abfa8ef3b16ccdaea54b58f5c031c.tar.gz plan9port-50ababbd552abfa8ef3b16ccdaea54b58f5c031c.tar.bz2 plan9port-50ababbd552abfa8ef3b16ccdaea54b58f5c031c.zip |
acme: fix bufread crash due to typing-point scrolling
Acme tracks the most recent typing insertion point and
the home and end keys stop there on their way
up to the top or down to the bottom of the file.
That point should be iq1, and it should be adjusted
properly so that it's always between 0 and t->file->b.nc inclusive.
(This is all code from an external contributor, years old at this
point but new since Plan 9.)
Somehow, sometimes iq1 ends up a little beyond b.nc,
and when passed to textbacknl it crashes acme in bufread.
I can't see how that can happen but if it does, avoid the crash.
It's tempting to pull the insertion point code out entirely
but this is a little less invasive and should fix things for now.
TBR=rsc
https://codereview.appspot.com/107730043
Diffstat (limited to 'font/naga10/knj10B.5005')
0 files changed, 0 insertions, 0 deletions