mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 21:01:24 +03:00
justify: do not copy too many bytes when trimming leading whitespace
This fixes https://savannah.gnu.org/bugs/?57972.
Bug existed since version 4.0, commit 877a6498
.
This commit is contained in:
parent
9d7e62be1a
commit
d6beca5dcf
@ -1870,7 +1870,7 @@ void do_justify(bool full_justify)
|
||||
if (indent_len > 0)
|
||||
memmove(cutbuffer->data + lead_len,
|
||||
cutbuffer->data + lead_len + indent_len,
|
||||
line_len - indent_len + 1);
|
||||
line_len - lead_len - indent_len + 1);
|
||||
|
||||
/* If the marked region ends in the middle of a line, and this line
|
||||
* has a leading part, check if the last line of the extracted region
|
||||
|
Loading…
Reference in New Issue
Block a user