fix position translation at EOF with softwrap (#5786)

pull/5790/head
Pascal Kuthe 2 years ago committed by GitHub
parent 6ed2348078
commit 2949bb018c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -207,7 +207,9 @@ pub fn render_text<'t>(
it it
} else { } else {
let mut last_pos = formatter.visual_pos(); let mut last_pos = formatter.visual_pos();
if last_pos.row >= row_off {
last_pos.col -= 1; last_pos.col -= 1;
last_pos.row -= row_off;
// check if any positions translated on the fly (like cursor) are at the EOF // check if any positions translated on the fly (like cursor) are at the EOF
translate_positions( translate_positions(
char_pos + 1, char_pos + 1,
@ -217,6 +219,7 @@ pub fn render_text<'t>(
renderer, renderer,
last_pos, last_pos,
); );
}
break; break;
}; };

Loading…
Cancel
Save