Skip to content

Shift+Enter still does not insert newline in chat input (regression from #751) #878

Description

@merealgallaispucel

Description:
In Vibe CLI v2.18.4, pressing Shift+Enter in the chat input still submits the message instead of inserting a new line, despite issue #751 being marked as completed.

Steps to reproduce:

  1. Launch Vibe CLI v2.18.4
  2. Type some text in the chat input
  3. Press Shift+Enter
  4. Observe: message is submitted (same as pressing Enter)
  5. Note: Ctrl+J works correctly and inserts a newline

Root cause analysis:
In vibe/cli/textual_ui/widgets/chat_input/text_area.py:

  • Line 37: Binding "shift+enter,ctrl+j"insert_newline is correctly defined
  • Line 157-158: action_insert_newline() correctly inserts \n
  • Line 336-339: Event handler intercepts shift+enter and stops it WITHOUT calling the action:
    if event.key == "shift+enter":
        event.prevent_default()
        event.stop()
        return

This handler runs before the binding can trigger, effectively blocking Shift+Enter. Ctrl+J works because it is not intercepted by this handler.

Expected behavior:
Shift+Enter should insert a newline in the chat input, just like Ctrl+J does.

Actual behavior:
Shift+Enter submits the message (same as Enter).

Version:

  • Vibe CLI: 2.18.4
  • OS: macOS (reporter confirmed it works everywhere else)

Related:

Suggested fix:
Either:

  1. Remove lines 336-339 entirely (let the binding handle it), OR
  2. Replace the handler with: self.action_insert_newline()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions