fix: never set completion selection to an empty range
This commit is contained in:
parent
b02f096fef
commit
b1e5b2f80f
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ pub fn updated(palette: *Type, button_: ?*Type.ButtonState) !void {
|
|||
const button = button_ orelse return cancel(palette);
|
||||
_, _, _, const replace = get_values(button.opts.label);
|
||||
const editor = tui.get_active_editor() orelse return error.NotFound;
|
||||
editor.get_primary().selection = replace;
|
||||
editor.get_primary().selection = if (replace.empty()) null else replace;
|
||||
}
|
||||
|
||||
pub fn cancel(palette: *Type) !void {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue