summaryrefslogtreecommitdiff
path: root/src/state/editor/buffer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/editor/buffer.rs')
-rw-r--r--src/state/editor/buffer.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/state/editor/buffer.rs b/src/state/editor/buffer.rs
index fa26eb7..49c27b9 100644
--- a/src/state/editor/buffer.rs
+++ b/src/state/editor/buffer.rs
@@ -108,7 +108,7 @@ impl Buffer {
.move_checked(CursorMove::Jump((new_x, self.cursor.y())));
self.refresh_buffer_max()
- } else {
+ } else if !self.cursor.is_at_top() {
let x = self.cursor.x() - 1;
self.current_line_mut().remove(x);
self.refresh_line_max();