Skip to content

Commit

Permalink
fix insert single cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
Kl4rry committed Dec 9, 2024
1 parent 96dd24e commit 80b31f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/ferrite-core/src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1860,7 +1860,7 @@ impl Buffer {
.filter(|line| line.line_without_line_ending(0).len_bytes() > 0)
.count();

if self.views[view_id].cursors.len() != lines {
if self.views[view_id].cursors.len() != lines || self.views[view_id].cursors.len() == 1 {
self.insert_text(view_id, &text, true);
self.history.finish();
return;
Expand Down

0 comments on commit 80b31f3

Please sign in to comment.