[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bracketed paste causes readline() to return multiple lines
From: |
Martin Buck |
Subject: |
Bracketed paste causes readline() to return multiple lines |
Date: |
Tue, 2 Jan 2024 22:28:09 +0100 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
Hi,
I noticed some unexpected behavior in readline v8.2 when pasting multi-line
text into an application using readline with bracketed paste mode enabled
(which defaults to enabled since v8.1, if I understand CHANGES correctly).
According to
https://tiswww.case.edu/php/chet/readline/readline.html#Basic-Behavior
readline() is supposed to return a single line of text without the trailing
newline. However, when pasting multiple lines, they are returned all at once
by readline() and without removing the newline at the end. This is different
from the pre-bracketed-paste-mode behavior where you got the multi-line text
line by line and it also contradicts the documentation.
Which one is correct? The current implementation or the documentation? I
hope it's the documentation, because it has promised to return individual
lines for ages and I could imagine that quite a few applications can get
confused if they suddenly get multiple lines.
Thanks for any insights,
Martin
- Bracketed paste causes readline() to return multiple lines,
Martin Buck <=