mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-23 05:11:35 +03:00
tweaks: don't bother reallocating the squeezed string, just terminate it
The string will be rewrapped right after, within microseconds.
This commit is contained in:
parent
a5869ba450
commit
4788c5f97d
@ -1761,7 +1761,7 @@ void squeeze(linestruct *line, size_t skip)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (shrunk > 0) {
|
if (shrunk > 0) {
|
||||||
null_at(&newdata, to - newdata);
|
*to = '\0';
|
||||||
free(line->data);
|
free(line->data);
|
||||||
line->data = newdata;
|
line->data = newdata;
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user