Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8182489

jshell tool: rerun multiline snippet from history corrupts history

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 10
    • 9
    • tools
    • b14

    Description

      Paul Deitel reports --

      Separately, if I type a multiline snippet and press Enter, then when I use the up arrow, it goes one line at a time back through that snippet. On the other hand if I re-execute a multiline snippet with /<id>, when I press the up arrow, it recalls the entire snippet. Then, as I continue to up arrow, the prompt gets corrupted.

      Paul
      ---------------------

      This problem can be reproduced with: /<id> /! and /-<n>

      Example --

      jshell> /li

         1 : class C {
               int m() { return 4; }
             }
                                                                                                                                                                              
      jshell> /1
      class C {
        int m() { return 4; }
      }
      | modified class C
                                                                                                                                                                              
      jshell> class C {
        int m() { return 4; }
      }

      Attachments

        Activity

          People

            jlahoda Jan Lahoda
            rfield Robert Field (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: