Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-11186] DEL key does not work as expected in REPL #4333

Closed
swift-ci opened this issue Jul 22, 2019 · 3 comments
Closed

[SR-11186] DEL key does not work as expected in REPL #4333

swift-ci opened this issue Jul 22, 2019 · 3 comments
Labels
bug Something isn't working LLDB for Swift

Comments

@swift-ci
Copy link

Previous ID SR-11186
Radar None
Original Reporter palle (JIRA User)
Type Bug
Status Resolved
Resolution Done
Environment

Apple Swift version 5.1 (swiftlang-1100.0.257 clang-1100.0.31.3).

macOS 10.15 Beta (19A512f)

Additional Detail from JIRA
Votes 0
Component/s LLDB for Swift
Labels Bug
Assignee None
Priority Medium

md5: c89ba02bf8493dbb05e0fdc3de72e4dd

Issue Description:

When pressing the DEL key in the REPL, the character left to the cursor is deleted. This behavior is inconsistent with the rest of the OS, where pressing DEL deletes the character directly under the cursor.

Therefore, the behavior of pressing DEL in the REPL should be changed to make it consistent with the OS.

Steps to reproduce:

  1. Open a terminal

  2. Enter swift and press enter to start the REPL

  3. Enter print("Hello World")

  4. Move the cursor to the beginning of the line

  5. Press the DEL key

Expected results:

After pressing the DEL key, the input should be rint("Hello World") (without the p in the beginning)

Actual results:

When pressing the DEL key, the input stays unchanged.

@belkadan
Copy link

cc jingham@apple.com (JIRA User). This does not happen with LLDB's normal command line, so I wonder what's different about the REPL?

@swift-ci
Copy link
Author

Comment by Jim Ingham (JIRA)

The REPL plays a bunch of games to support multi-line editing and history recall. It's not entirely surprising something in there changed this behavior.

@swift-ci
Copy link
Author

Comment by Palle Klewitz (JIRA)

Looks like this is fixed in Swift 5.2

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working LLDB for Swift
Projects
None yet
Development

No branches or pull requests

2 participants