Skip to content

Commit 7cba833

Browse files
fix new enter ime_key behavior
1 parent fa93fcd commit 7cba833

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/query.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ impl RenderOnce for TextInput {
252252
}
253253
_ => {}
254254
}
255+
} else if keystroke.as_str() == "enter" && !ev.keystroke.modifiers.shift {
256+
//
255257
} else if let Some(ime_key) = ime_key {
256258
editor
257259
.text
@@ -300,16 +302,6 @@ impl RenderOnce for TextInput {
300302
editor.selection.end = editor.selection.start;
301303
}
302304
}
303-
"enter" => {
304-
if ev.keystroke.modifiers.shift {
305-
editor.text.insert(
306-
editor.char_range_to_text_range(&editor.text).start,
307-
'\n',
308-
);
309-
let i = editor.selection.start + 1;
310-
editor.selection = i..i;
311-
}
312-
}
313305
_ => {}
314306
};
315307
}

0 commit comments

Comments
 (0)