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()),
|
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();
|
ed.auto_detect_indentation_style();
|
||||||
|
|
||||||
return ed;
|
return ed;
|
||||||
|
@ -337,7 +343,7 @@ impl Editor {
|
||||||
c.update_vis_start(&(self.buffer));
|
c.update_vis_start(&(self.buffer));
|
||||||
|
|
||||||
// Update offset
|
// Update offset
|
||||||
offset -= len;
|
offset += len;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adjust view
|
// Adjust view
|
||||||
|
@ -368,7 +374,7 @@ impl Editor {
|
||||||
c.update_vis_start(&(self.buffer));
|
c.update_vis_start(&(self.buffer));
|
||||||
|
|
||||||
// Update offset
|
// Update offset
|
||||||
offset -= len;
|
offset += len;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adjust view
|
// Adjust view
|
||||||
|
|
Loading…
Reference in New Issue
Block a user