Fix bug #15951 with vertical-motion near beginning of narrowed region.
src/bidi.c (bidi_find_paragraph_start): Limit the returned positions to BEGV_BYTE..ZV_BYTE range.
This commit is contained in:
parent
965bb23acf
commit
cd88d68262
2 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2013-11-22 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* bidi.c (bidi_find_paragraph_start): Limit the returned positions
|
||||
to BEGV_BYTE..ZV_BYTE range. (Bug#15951)
|
||||
|
||||
2013-11-21 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Fix some dependency problems that cause unnecessary recompiles.
|
||||
|
|
|
@ -1148,6 +1148,9 @@ bidi_find_paragraph_start (ptrdiff_t pos, ptrdiff_t pos_byte)
|
|||
pos = BEGV, pos_byte = BEGV_BYTE;
|
||||
if (bpc)
|
||||
know_region_cache (current_buffer, bpc, pos, oldpos);
|
||||
/* Positions returned by the region cache are not limited to
|
||||
BEGV..ZV range, so we limit them here. */
|
||||
pos_byte = clip_to_bounds (BEGV_BYTE, pos_byte, ZV_BYTE);
|
||||
return pos_byte;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue