fix: trigger completions also on inserts that end in a trigger char

This commit is contained in:
CJ van den Berg 2026-01-15 10:38:20 +01:00
parent dcc196bf25
commit 7b1f6c898d
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -2892,7 +2892,7 @@ pub const Editor = struct {
cursor.row, cursor.col, root_ = try root_.insert_chars(cursor.row, cursor.col, s, allocator, self.metrics); cursor.row, cursor.col, root_ = try root_.insert_chars(cursor.row, cursor.col, s, allocator, self.metrics);
cursor.target = cursor.col; cursor.target = cursor.col;
self.nudge_insert(.{ .begin = begin, .end = cursor.* }, cursel, s.len); self.nudge_insert(.{ .begin = begin, .end = cursor.* }, cursel, s.len);
if (s.len == 1) self.run_triggers(cursel, s[0], .insert); if (s.len > 0) self.run_triggers(cursel, s[s.len - 1], .insert);
return root_; return root_;
} }