Fixed some bugs in new multi-cursor code.
This commit is contained in:
parent
9a22812cf1
commit
e726b2d0f8
|
@ -78,6 +78,12 @@ impl Editor {
|
|||
cursors: vec!(Cursor::new()),
|
||||
};
|
||||
|
||||
// // For multiple-cursor testing
|
||||
// ed.cursors.push(Cursor::new());
|
||||
// ed.cursors[1].range.0 = 30;
|
||||
// ed.cursors[1].range.1 = 30;
|
||||
// ed.cursors[1].update_vis_start(&(ed.buffer));
|
||||
|
||||
ed.auto_detect_indentation_style();
|
||||
|
||||
return ed;
|
||||
|
@ -337,7 +343,7 @@ impl Editor {
|
|||
c.update_vis_start(&(self.buffer));
|
||||
|
||||
// Update offset
|
||||
offset -= len;
|
||||
offset += len;
|
||||
}
|
||||
|
||||
// Adjust view
|
||||
|
@ -368,7 +374,7 @@ impl Editor {
|
|||
c.update_vis_start(&(self.buffer));
|
||||
|
||||
// Update offset
|
||||
offset -= len;
|
||||
offset += len;
|
||||
}
|
||||
|
||||
// Adjust view
|
||||
|
|
Loading…
Reference in New Issue
Block a user