Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Terminal crash with special character ~ #23

Open
loicwolff opened this issue Jan 14, 2018 · 2 comments
Open

Terminal crash with special character ~ #23

loicwolff opened this issue Jan 14, 2018 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@loicwolff
Copy link

loicwolff commented Jan 14, 2018

Weird bug. When I type ~ on my French logitech keyboard (⌥ + n), iOS waits for another key in case I want to type a special character (e.g. ñ).

When I type ~ in Terminal and press enter, I get this message
weird message 1

Then, if I press backspace twice, the first one delete the space after the :
weird message 2

And the second one makes the app crash.

@loicwolff loicwolff changed the title Terminal crash with special character `~ Terminal crash with special character ~ Jan 14, 2018
@louisdh louisdh added the bug Something isn't working label Jan 14, 2018
@holzschu
Copy link
Contributor

I think I have the origin (plus easier to reproduce): if the text cursor moves before the end of the command prompt (in this case, before the space after the ":"), Terminal crashes on line 172 of TerminalView.swift:

 let i = textView.text.distance(from: textView.text.startIndex, to: currentCommandStartIndex)

I reproduced it by moving the cursor with keyboard arrows, then hitting Ctrl-K (to erase the entire line).

@louisdh louisdh self-assigned this Jan 20, 2018
@djerfy
Copy link

djerfy commented Feb 1, 2018

A relationship with the backspace that crash without command?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants