Skip to content

repl history brokenΒ #24781

Description

@BridgeAR

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?

Activity

  1. BridgeAR commented on Dec 2, 2018

    @BridgeAR
    MemberAuthor
  2. added
    replIssues and PRs related to the REPL subsystem.
    on Dec 2, 2018
  3. targos commented on Dec 2, 2018

    @targos
    Member

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

  4. antsmartian commented on Dec 2, 2018

    @antsmartian
    Contributor

    @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.

  5. targos commented on Dec 2, 2018

    @targos
    Member

    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.

  6. targos commented on Dec 2, 2018

    @targos
    Member

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

  7. BridgeAR commented on Dec 2, 2018

    @BridgeAR
    MemberAuthor

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

  8. added
    duplicateIssues and PRs that are duplicates of other issues or PRs.
    on Dec 2, 2018
  9. antsmartian commented on Dec 2, 2018

    @antsmartian
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateIssues and PRs that are duplicates of other issues or PRs.replIssues and PRs related to the REPL subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions