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

repl history broken #24781

Closed
BridgeAR opened this issue Dec 2, 2018 · 7 comments
Closed

repl history broken #24781

BridgeAR opened this issue Dec 2, 2018 · 7 comments
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. repl Issues and PRs related to the REPL subsystem.

Comments

@BridgeAR
Copy link
Member

BridgeAR commented Dec 2, 2018

Version: latest master

The new multiline history does not fully work as it should. While trying to fix it I ran into further issues, so I decided to just open this issue about it for now.

Example 1:

'test' ENTER
invisible ` ENTER
foo` ENTER
UP -> foo` [BUG] (the invisible part is not saved in the history anymore)
UP -> `'test'

Example 2:

`foo ENTER
bar ENTER
baz` ENTER
UP -> `foobarbaz` [BUG] (the line breaks where intentional, removing them changes the content)

I suggest to revert this feature for now and to reland with a very decent test coverage for lots of edge cases. What do others think?

@BridgeAR
Copy link
Member Author

BridgeAR commented Dec 2, 2018

Ping @antsmartian

@BridgeAR BridgeAR added the repl Issues and PRs related to the REPL subsystem. label Dec 2, 2018
@targos
Copy link
Member

targos commented Dec 2, 2018

instead of revert, can we put it behind a flag? that would make it easier to do incremental improvements

@antsmartian
Copy link
Contributor

antsmartian commented Dec 2, 2018

@BridgeAR I guess we have already an issue with multilines in the context of template string literals. (On mobile now, couldn't find that.) From the examples I see that's what it's getting affected. Did you see anything else broken apart from template string literals?
Thanks for detailed report.

@targos
Copy link
Member

targos commented Dec 2, 2018

There's also an issue when the code contains a comment:

var obj = {
  prop: 123, // comment
  otherProp: 456
}

becomes

var obj = {prop: 123, // commentotherProp: 456}

Basically, anything that relies on line breaks is broken.

@targos
Copy link
Member

targos commented Dec 2, 2018

Is there no way for us to keep the line breaks? That's what zsh does.

@BridgeAR
Copy link
Member Author

BridgeAR commented Dec 2, 2018

#24231 - it reports the same as here, so I am going to close this as a duplicate.

@BridgeAR BridgeAR closed this as completed Dec 2, 2018
@BridgeAR BridgeAR added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Dec 2, 2018
@antsmartian
Copy link
Contributor

@targos Yes you are correct. Let me work on the fix.
@BridgeAR Thanks for finding the duplicate issue and closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. repl Issues and PRs related to the REPL subsystem.
Projects
None yet
Development

No branches or pull requests

3 participants