чување df0ae1f93847d817fa90d45160adbef952f01d7d
родитељ 28d58e70c162b8ba251245fc29800af8cf01f1b8
Аутор: Страхиња Радић <sr@strahinja.org>
Датум: Tue, 27 Aug 2024 11:09:34 +0200
Bugfix: Wrapping a paragraph with C-J wasn't wrapping the last line
Diffstat:
измењених датотека: 3, додавања: 5(+), брисања: 5(-)
diff --git a/TODO b/TODO
@@ -1,9 +1,6 @@
TODO
====
-[ ] Check wrapping with C-J when the last line in a paragraph is longer than
- wrap width
-
[ ] Convert #define's in config.def.h to struct Color
[ ] Add struct Color to master branch
diff --git a/TODO.done b/TODO.done
@@ -1,6 +1,9 @@
Done or canceled todos
======================
+[x] Check wrapping with C-J when the last line in a paragraph is longer than
+ wrap width
+
[x] Investigate >2-byte UTF editing (Emoji...)
- setlocale(LC_ALL, "");
diff --git a/sled.c b/sled.c
@@ -2792,7 +2792,7 @@ wrap_next_line:
}
}
- if (cur_row == MIN((end_row), state->rows_count))
+ if (cur_row == MIN((end_row + 1), state->rows_count))
break;
dlen = display_length(current->text, current->length);
@@ -2800,7 +2800,7 @@ wrap_next_line:
cur_row++;
if (added_blank)
goto wrap_finish;
- if (cur_row == state->rows_count)
+ if (cur_row >= state->rows_count)
{
added_blank = 1;
move_end(state);