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

String interpolation with #{variable} in editor does not work properly #114

Open
PragTob opened this issue Aug 20, 2011 · 3 comments
Open
Milestone

Comments

@PragTob
Copy link
Member

PragTob commented Aug 20, 2011

What I mean by doesn't work is that I can't type it in. For instance I wanna type this:

name = ask "What is your name?"
alert "Hello, #{name}!"

However I get stuck at:

name = ask "What is your name?"
alert "Hello, #{name}

Because I can't move the cursor behind } with the keys (right arrow key). I can with the mouse but than I can't type in a single character and if I hit backspace the bracket just gets yellow highlighting. Delete before the bracket also doesn't work. The only thing that works is first writing:

alert "Hello, "

and then inserting the String interpolation. I know the tutorial suggests writing it another way but it is still odd. I suspect that it is supposed to be some editing help for not deleting blocks (since you can delete the first bracket and then both are gone).

edit: If the description is unclear I'll try to make a screencast, please just tell me :-)

@steveklabnik
Copy link
Member

This is totally reproducible. I never noticed because I typed the } anyway, since I'm not used to my editor inserting the character...

This probably has to do with us keeping that string buffer. It gets the length wrong or something...

@PragTob
Copy link
Member Author

PragTob commented Oct 16, 2011

Ok thanks for reproducing and the hint :-) Will take a look when taking a stab at that code :-D

@steveklabnik
Copy link
Member

Sweeeet.

I think we really need to figure out if it's possible to just do these things in a regular text area. The lack of two finger scrolling (#24) and internationationalization (#14) is pretty rough.

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