File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -510,6 +510,7 @@ export const MultilineInput = forwardRef<
510510 const hasBackslashBeforeCursor =
511511 cursorPosition > 0 && value [ cursorPosition - 1 ] === '\\'
512512
513+ // Plain Enter: no modifiers, sequence is '\r' (macOS) or '\n' (Linux)
513514 const isPlainEnter =
514515 isEnterKey &&
515516 ! key . shift &&
@@ -518,10 +519,9 @@ export const MultilineInput = forwardRef<
518519 ! key . option &&
519520 ! isAltLikeModifier &&
520521 ! hasEscapePrefix &&
521- key . sequence === '\r' &&
522+ ( key . sequence === '\r' || key . sequence === '\n' ) &&
522523 ! hasBackslashBeforeCursor
523- const isShiftEnter =
524- isEnterKey && ( Boolean ( key . shift ) || key . sequence === '\n' )
524+ const isShiftEnter = isEnterKey && Boolean ( key . shift )
525525 const isOptionEnter =
526526 isEnterKey && ( isAltLikeModifier || hasEscapePrefix )
527527 const isBackslashEnter = isEnterKey && hasBackslashBeforeCursor
You can’t perform that action at this time.
0 commit comments