justify: when the cursor is at the left edge, keep it there

Only when the endpoint of the selection is actually IN a leading part,
then it should be advanced to include the whole leading part, so that
the succeeding paragraph will get the proper first-line indentation.
master
Benno Schulenberg 2020-03-10 10:30:07 +01:00
parent e209686835
commit e247be69bf
1 changed files with 1 additions and 1 deletions

View File

@ -1808,7 +1808,7 @@ void do_justify(bool full_justify)
fore_length = quot_len + indent_length(endline->data + quot_len);
/* When the region ends IN the lead, take the whole lead. */
if (end_x < fore_length)
if (0 < end_x && end_x < fore_length)
end_x = fore_length;
/* Include preceding and subsequent whitespace into the marked region. */