RFR 8158738: jshell tool: Save does not affect jshell if started from another editor

Robert Field robert.field at oracle.com
Thu Aug 25 01:59:54 UTC 2016

  Please review this fix.  Description excerpted from the bug report --

     When the /edit command is used, until the editor exits, no jshell 
prompt is displayed and no input is accepted, during this time
     the jshell tool watches the temp file for changes, entering any 
changes. When the editor exits the jshell tool stops watching.

     From my experiments with gedit, what is happening in this case is 
that the first time the gedit command is used it creates the
     window and waits for all windows to close before exiting. 
Subsequent calls to gedit add a pane for the file and return immediately.
     As a result the jshell tool assumes the editor has exited, stops 
watching the file, and queries for input with a prompt.

     For gedit, this can be addressed by using the --wait or maybe 
better the --standalone option:

         /set editor gedit -s

     However, other editors do not have support for waiting.

     The implemented solution: Add a "-wait" option to '/set editor' 
which prompts and waits before transitioning from edit mode.




More information about the kulla-dev mailing list