Ticket #10654 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Problem with loading saving scripts

Reported by: Owen Arnold Owned by: Martyn Gigg
Priority: blocker Milestone: Release 3.3
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Owen Arnold

Description

The mantid script window is not correctly saving out scripts. Affects OSX, possibly other platforms too.

Try this: 1) Open Mantid and the script window 2) Write a few lines 3) Save the file 4) Reload the file in Mantid script window. New line formatting is lost.

Running cat -v on the file, saved from mantid produces results like this

my test^M
new line^M
new line^M
new line

Saving a file in ahy other text editior produces files like this

my test
new line
new line
new line

Attachments

replicate_horace_slice.py (2.6 KB) - added by Owen Arnold 6 years ago.

Change History

comment:1 Changed 6 years ago by Owen Arnold

  • Status changed from new to assigned

Changed 6 years ago by Owen Arnold

comment:2 Changed 6 years ago by Owen Arnold

Attached file is example of what mantid currently does.

comment:3 Changed 6 years ago by Martyn Gigg

I've just compiled master on OS X and I can't seem to reproduce this anymore. Could you see if the nightly still shows the same problem on your machine?

comment:4 Changed 6 years ago by Martyn Gigg

  • Status changed from assigned to inprogress

comment:5 Changed 6 years ago by Martyn Gigg

I can now reproduce this on Yosemite. It looks like the line endings have been set to CR, which you can see if you check the new "Show Whitespace" option. We probably need to force them to LF

comment:6 Changed 6 years ago by Martyn Gigg

Use unix-style line endings on OSX.

This is what later versions of QScintilla as CR is a pre-OSX thing. Refs #10654

Changeset: acb7e2c6e78d4417bcdfc1c3c23bab6ea03c2fe8

comment:7 Changed 6 years ago by Martyn Gigg

  • Status changed from inprogress to verify
  • Resolution set to fixed

This is being verified as pull request #110.

comment:8 Changed 6 years ago by Owen Arnold

  • Status changed from verify to verifying
  • Tester set to Owen Arnold

comment:9 Changed 6 years ago by Owen Arnold

test this please

comment:10 Changed 6 years ago by Owen Arnold

Looks good. Issue has been fixed.

comment:11 Changed 6 years ago by Owen Arnold

  • Status changed from verifying to closed

comment:12 Changed 6 years ago by Owen Arnold

Merge pull request #110 from mantidproject/bugfix/10654_osx_script_editor_eol

Use unix-style line endings in script editor on OSX.

Full changeset: c685060614b74129fae6b3d3840e00ff2293488c

comment:13 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11496

Note: See TracTickets for help on using tickets.