fix: move reflow message to Editor.reflow

We don't want to display the log message when reflow is used internally.
For example by the info_view.
This commit is contained in:
CJ van den Berg 2026-02-18 16:11:29 +01:00
parent 767d3a5bfd
commit a7c19f3a60
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 1 additions and 2 deletions

View file

@ -8,8 +8,6 @@ pub fn reflow(allocator: std.mem.Allocator, text: []const u8, width: usize) erro
var output: std.Io.Writer.Allocating = .init(allocator);
const writer = &output.writer;
std.log.info("reflow @{d}", .{width});
var first = true;
var line_len: usize = 0;
for (words) |word| {

View file

@ -7056,6 +7056,7 @@ pub const Editor = struct {
const sfa_allocator = sfa.get();
const cut_text = copy_selection(root, sel, sfa_allocator, self.metrics) catch return error.Stop;
defer sfa_allocator.free(cut_text);
std.log.info("reflow @{d}", .{reflow_width});
const reflowed = Buffer.reflow(sfa_allocator, cut_text, reflow_width) catch return error.Stop;
defer sfa_allocator.free(reflowed);
root = try self.delete_selection(root, cursel, allocator);