diff options
| author | John Vogel <jvogel4@stny.rr.com> | 2022-09-11 19:51:20 -0400 |
|---|---|---|
| committer | Randy Palamar <palamar@ualberta.ca> | 2023-07-16 08:30:25 -0600 |
| commit | e728898cbb68f43472befc52b24318372b2e6159 (patch) | |
| tree | 2d260bc04577f176193eb760ec3b8ef77fca11ba /text-motions.c | |
| parent | 424b2190b9207eea9807eef7132cd95e881cbbbf (diff) | |
| download | vis-e728898cbb68f43472befc52b24318372b2e6159.tar.gz vis-e728898cbb68f43472befc52b24318372b2e6159.tar.xz | |
partial revert of commit f55312ba
text_paragraph_prev():
Bring back the previous usage of text_iterator_byte_get() in the
while conditional and text_iterator_char_prev() in the loop body.
Fixes #1028 - { moves back a paragraph too much if cursor at start of line
Diffstat (limited to 'text-motions.c')
| -rw-r--r-- | text-motions.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/text-motions.c b/text-motions.c index 1430d49..13aad19 100644 --- a/text-motions.c +++ b/text-motions.c @@ -459,7 +459,8 @@ size_t text_paragraph_prev(Text *txt, size_t pos) { char c; Iterator it = text_iterator_get(txt, pos); - while (text_iterator_byte_prev(&it, &c) && (c == '\n' || blank(c))); + while (text_iterator_byte_get(&it, &c) && (c == '\n' || blank(c))) + text_iterator_char_prev(&it, NULL); return text_line_blank_prev(txt, it.pos); } |
