From: <ker...@us...> - 2024-10-23 17:27:39
|
Revision: 25765 http://sourceforge.net/p/jedit/svn/25765 Author: kerik-sf Date: 2024-10-23 17:27:36 +0000 (Wed, 23 Oct 2024) Log Message: ----------- fix Run_Script macro on beanshell under windows (#641) See https://sourceforge.net/p/jedit/patches/641/ Modified Paths: -------------- jEdit/trunk/doc/CHANGES.txt jEdit/trunk/macros/Misc/Run_Script.bsh Modified: jEdit/trunk/doc/CHANGES.txt =================================================================== --- jEdit/trunk/doc/CHANGES.txt 2024-10-23 17:18:36 UTC (rev 25764) +++ jEdit/trunk/doc/CHANGES.txt 2024-10-23 17:27:36 UTC (rev 25765) @@ -13,6 +13,7 @@ - fixes for GenericGUIUtilities in macros (patch #636, #637, #638, Robert Schwenn) - fix for SyntaxUtilities in Color_Picker macro (patch #639, Robert Schwenn) +- fix Run_Script macro beanshell under windows (patch #641, Robert Schwenn) }}} {{{ Miscellaneous Modified: jEdit/trunk/macros/Misc/Run_Script.bsh =================================================================== --- jEdit/trunk/macros/Misc/Run_Script.bsh 2024-10-23 17:18:36 UTC (rev 25764) +++ jEdit/trunk/macros/Misc/Run_Script.bsh 2024-10-23 17:27:36 UTC (rev 25765) @@ -48,13 +48,16 @@ buffer.saveAs(view, true); else buffer.save(view, buffer.getPath()); + mode = buffer.getMode().getName(); path = buffer.getPath() ; os = System.getProperty("os.name"); if(os.indexOf("Windows") != -1) path = "\"" + path + "\""; + if(mode.equals("beanshell")) { - source(path); + // Double quotes (under Windows, see above) prevent this from execution + source(buffer.getPath()); } else if(mode.equals("awk")) { execScript("awk", "awk -f " + path); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |