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

BUG: Double space adds a full stop #99

Open
dotemacs opened this issue Jan 15, 2017 · 5 comments
Open

BUG: Double space adds a full stop #99

dotemacs opened this issue Jan 15, 2017 · 5 comments

Comments

@dotemacs
Copy link
Contributor

How to reproduce:

  1. Start Replete
  2. Enter a '(' (which will then automatically add the second closing ')')
  3. Press spacebar two times
  4. full stop added
@dotemacs
Copy link
Contributor Author

But if you press delete two times, to delete the full stop, you can then press the space bar as many times as you wish and full stop won't be added again.

Then go in a delete all the whitespace you've just added and the parenthesis. Insert a new parenthesis and the bug can be replicated again.

dotemacs added a commit to dotemacs/replete that referenced this issue Jan 15, 2017
Updated the code to Swift 3 syntax.

The bug:

replete-repl#99

is still present.
mfikes pushed a commit that referenced this issue Jan 15, 2017
Updated the code to Swift 3 syntax.

The bug:

#99

is still present.
@mfikes
Copy link
Member

mfikes commented Jan 15, 2017

@dotemacs This issue had been reported and fixed previously ( #78 ).

Perhaps it regressed with the change to Swift 3 and subtleties surrounding string handling?
Or perhaps it is an issue that occurs in the simulator but not on the device?

(I haven't investigated either.)

@dotemacs
Copy link
Contributor Author

Hello @mfikes

In Swift 3 there has been a change to the way substrings are manipulated, so it made this:

https://github.com/mfikes/replete/blob/33415a4780105b6b138867f0137a6a979fe97034/Replete/ReplViewController.swift#L210

a bit more complicated:

https://github.com/mfikes/replete/blob/e3eb2797e95bc07deafeacf1c5a10d4bfff9d90e/Replete/ReplViewController.swift#L210

But looking at the app version 1.6 on iOS 10.2, entering:

Keys typed Values shown
( SPACE SPACE (. )

Looking at what's currently in the master de8c5ca

Keys typed Values shown
( SPACE SPACE (. )

But if you delete the full stop, then you can keep entering SPACE as much as you want, the double space doesn't add the full stop, on that line.

@mfikes
Copy link
Member

mfikes commented Jan 15, 2017

Interestingly, I can't reproduce the problem with the released version 1.6 on iOS 10.2 (I also have the "." shortcut enabled in my keyboard.) Hrm.

@dotemacs
Copy link
Contributor Author

Ah! I was using Gboard keyboard

https://appsto.re/gb/syGebb.i

version 1.2.3.6281.

Using Apple's stock keyboard, the bug is not there. Good that we got that cleared up :)

So it look like the regression is only present in the master & in the simulator. I'll try the app from the master on the phone & see how it acts there...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants