]> git.neil.brown.name Git - edlib.git/commit
render-lines: avoid looping indefinitely when shifting.
authorNeilBrown <neil@brown.name>
Sun, 3 Sep 2023 09:16:51 +0000 (19:16 +1000)
committerNeilBrown <neil@brown.name>
Mon, 4 Sep 2023 23:07:53 +0000 (09:07 +1000)
commit03f2f0e9f43401b7615b7f37dcc866ac0dd1a7a8
tree511475bb370118d794fa56b911305b3b66d65454
parentfe32b129e26413b6aa846464695fd259e17583f1
render-lines: avoid looping indefinitely when shifting.

If <rtab> is used for markup when wrap is enabled, and if the cursor is
at the end of the list, it is impossible to shift enough that there is
room for the cursor after the text.
So the shift loop continues endlessly.

Put a hard limit on this, and use a consistent limit in the other places
that we shift.

Signed-off-by: NeilBrown <neil@brown.name>
render-lines.c