fix: clamp cursor to buffer in toggle_cursel_prefix
This commit is contained in:
parent
023298cc47
commit
1ad6b8db3d
1 changed files with 1 additions and 0 deletions
|
@ -2723,6 +2723,7 @@ pub const Editor = struct {
|
|||
const new_text = text_manip.toggle_prefix_in_text(self.prefix, text, alloc) catch return error.Stop;
|
||||
root = self.insert(root, cursel, new_text, allocator) catch return error.Stop;
|
||||
cursel.* = saved;
|
||||
cursel.cursor.clamp_to_buffer(root, self.metrics);
|
||||
return root;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue