mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Avoid infinite loop with images under 'display-line-numbers-mode'
* src/xdisp.c (move_it_in_display_line_to, display_line): When considering the first glyph on a glyph row, take into consideration the glyphs produced for line-number display. (Bug#77065)
This commit is contained in:
parent
bbad5be9f0
commit
df66695780
1 changed files with 5 additions and 5 deletions
10
src/xdisp.c
10
src/xdisp.c
|
|
@ -10295,10 +10295,10 @@ move_it_in_display_line_to (struct it *it,
|
||||||
{
|
{
|
||||||
bool moved_forward = false;
|
bool moved_forward = false;
|
||||||
|
|
||||||
if (/* IT->hpos == 0 means the very first glyph
|
if (/* IT->hpos == 0 (modulo line-number width) means
|
||||||
doesn't fit on the line, e.g. a wide
|
the very first glyph doesn't fit on the line,
|
||||||
image. */
|
e.g., a wide image. */
|
||||||
it->hpos == 0
|
it->hpos == 0 + (it->lnum_width ? it->lnum_width + 2 : 0)
|
||||||
|| (new_x == it->last_visible_x
|
|| (new_x == it->last_visible_x
|
||||||
&& FRAME_WINDOW_P (it->f)))
|
&& FRAME_WINDOW_P (it->f)))
|
||||||
{
|
{
|
||||||
|
|
@ -25842,7 +25842,7 @@ display_line (struct it *it, int cursor_vpos)
|
||||||
{
|
{
|
||||||
/* End of a continued line. */
|
/* End of a continued line. */
|
||||||
|
|
||||||
if (it->hpos == 0
|
if (it->hpos == 0 + (it->lnum_width ? it->lnum_width + 2 : 0)
|
||||||
|| (new_x == it->last_visible_x
|
|| (new_x == it->last_visible_x
|
||||||
&& FRAME_WINDOW_P (it->f)
|
&& FRAME_WINDOW_P (it->f)
|
||||||
&& (row->reversed_p
|
&& (row->reversed_p
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue