Passing tests and removed local argument. Also pulled autoscroll argument out to change_selections
This commit is contained in:
parent
c9dcfff607
commit
db0a9114c2
19 changed files with 351 additions and 397 deletions
|
@ -57,8 +57,8 @@ pub fn new_journal_entry(app_state: Arc<AppState>, cx: &mut MutableAppContext) {
|
|||
if let Some(editor) = item.downcast::<Editor>() {
|
||||
editor.update(&mut cx, |editor, cx| {
|
||||
let len = editor.buffer().read(cx).read(cx).len();
|
||||
editor.change_selections(true, cx, |s| {
|
||||
s.select_ranges([len..len], Some(Autoscroll::Center))
|
||||
editor.change_selections(Some(Autoscroll::Center), cx, |s| {
|
||||
s.select_ranges([len..len])
|
||||
});
|
||||
if len > 0 {
|
||||
editor.insert("\n\n", cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue