REPL: Characters don't show up, backspace doesn't remove them, inserted text not visible

I'm trying out Swift 5.3.1 on Ubuntu 20.10. In the REPL I get behavior that makes it impossible for me to type properly:

  • When I try to write a closing curly bracket (}) nothing shows up in its place (as if I typed a space). It's there, just not visible. Other brackets show up when typed: {[]()
  • When I use backspace the deleted character is not visibly removed. I confirm that it's gone after entering the line though.
  • When adding text in the middle of the line, the cursor advances but no visible change to the text is seen. I'm adding characters in the middle of the line, but I can't see them until I evaluate the line.

Is this a common problem? I verified the signature before installing.

1 Like

Hi Andreas,

Did you type a colon (:) somewhere in a command? This issue sounds very similar to https://bugs.swift.org/browse/SR-13029

Hello Steven,

No, actually, all I need to do to recreate it is type any command, valid or not. In the initial prompt (line 1) backspace works, but as soon as I type e.g. import Foundation it breaks on line 2.

Ah yeah,

Based on what happens after the issue is triggered, this does look like the same issue. It appears that using a backspace on all but the first command also triggers it.

Perhaps I should add it as a separate bug? I tried reproducing it without using backspace, and the problem still exists on line 2 after only using arrow keys to move the caret.

I'm not sure if it's worth a separate issue though since Ubuntu 20.10 isn't officially supported.

If the behavior is the same, it's probably the same bug, but reporting it again can't hurt.

I don't think this is specific to Ubuntu 20.10 as I can also reproduce it on 20.04 and Fedora 32.

I just hope someone takes notice and is able to fix it, as the REPL has been broken on Linux for months now. Sure, you can type print("Hello, world!"), but if you try anything more than that, you run into issues like this.

1 Like

Thanks for the info, that's good to know.

New bug: https://bugs.swift.org/browse/SR-13885

Terms of Service

Privacy Policy

Cookie Policy