mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-13 08:05:01 +00:00
Apparently prompt toolkit can not express control-enter?
This commit is contained in:
parent
dbf3b09c06
commit
e7f35e2cf7
2 changed files with 4 additions and 5 deletions
|
@ -5,10 +5,9 @@ from pathlib import Path
|
|||
|
||||
from prompt_toolkit.completion import Completer, Completion
|
||||
from prompt_toolkit.history import FileHistory
|
||||
from prompt_toolkit.key_binding import KeyBindings
|
||||
from prompt_toolkit.lexers import PygmentsLexer
|
||||
from prompt_toolkit.shortcuts import CompleteStyle, PromptSession, prompt
|
||||
from prompt_toolkit.keys import Keys
|
||||
from prompt_toolkit.key_binding import KeyBindings
|
||||
from prompt_toolkit.styles import Style
|
||||
from pygments.lexers import MarkdownLexer, guess_lexer_for_filename
|
||||
from pygments.token import Token
|
||||
|
@ -207,9 +206,9 @@ class InputOutput:
|
|||
|
||||
kb = KeyBindings()
|
||||
|
||||
@kb.add(Keys.ControlM, eager=True)
|
||||
@kb.add("escape", "c-m", eager=True)
|
||||
def _(event):
|
||||
event.current_buffer.insert_text('\n')
|
||||
event.current_buffer.insert_text("\n")
|
||||
|
||||
session = PromptSession(key_bindings=kb, **session_kwargs)
|
||||
line = session.prompt()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue