fix: fix list alignment when ident options used in Word Procesor

This commit is contained in:
2026-05-26 13:24:51 +02:00
parent dfd618da89
commit f2dd09265e
+6 -5
View File
@@ -1027,17 +1027,18 @@ void wp_toggle_list(WordProcessorState* wp, uint8_t list_type) {
para->list_type = PARA_LIST_NONE;
changed = true;
}
if (para->left_indent == WP_LIST_LEFT && para->first_line_indent == WP_LIST_HANGING) {
para->left_indent = 0;
if (para->first_line_indent == WP_LIST_HANGING && para->left_indent >= WP_LIST_LEFT) {
para->left_indent = (int16_t)(para->left_indent - WP_LIST_LEFT);
para->first_line_indent = 0;
changed = true;
}
continue;
}
if (para->list_type == PARA_LIST_NONE &&
para->left_indent == 0 && para->first_line_indent == 0) {
para->left_indent = WP_LIST_LEFT;
if (para->list_type == PARA_LIST_NONE && para->first_line_indent >= 0) {
int new_left = para->left_indent + WP_LIST_LEFT;
if (new_left > 240) new_left = 240;
para->left_indent = (int16_t)new_left;
para->first_line_indent = WP_LIST_HANGING;
changed = true;
}