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

jshell tool: rerun multiline snippet from history corrupts history

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 10
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      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

            • Assignee:
              jlahoda Jan Lahoda
              Reporter:
              rfield Robert Field
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: