Uploaded image for project: 'GMAT'
  1. GMAT
  2. GMT-3029

Script Editor writes inconsistent line endings to file

    Details

      Description

      The attached script is written on a Window system and has Windows-style line endings (CR/LF). Under certain conditions, the Script Editor will write plain LF line endings to the file when saving, making the file inconsistent. This causes problems with viewing scripts in Notepad, managing them in SVN, etc.

      Here's one way to duplicate this:

      1. Load the attached script in GMAT, and in Notepad++ with Show Symbols turned on (or in another editor that shows line endings)
      2. In GMAT, open it in the Script Editor.
      3. Change individual lines and save the script, and notice that the CR/LF endings are preserved.
      4. Now in GMAT, select an entire section of script and click Cut.
      5. Save the file and view line endings.
      6. Now paste the section back into the script and save the script.
      7. In the external editor, notice that the script editor wrote LF line endings instead of the original CR/LF.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            shughes Steven Hughes added a comment -

            CCB: P2 R2013a. This may be a GetGeneratingString() issue. Tom, when you look at this if it appears to not be an editor bug, reassign to DJC.

            Show
            shughes Steven Hughes added a comment - CCB: P2 R2013a. This may be a GetGeneratingString() issue. Tom, when you look at this if it appears to not be an editor bug, reassign to DJC.
            Hide
            tgrubb Thomas Grubb added a comment -

            Fixed in 2012-10-04 Build

            Show
            tgrubb Thomas Grubb added a comment - Fixed in 2012-10-04 Build
            Hide
            tgrubb Thomas Grubb added a comment -

            Note: this was NOT a GetGeneratingString issue. The Cut string would appear with CRLF in NotePad++. On paste, StyledScriptEditor was in wrong mode. Fixed on Windows.

            Show
            tgrubb Thomas Grubb added a comment - Note: this was NOT a GetGeneratingString issue. The Cut string would appear with CRLF in NotePad++. On paste, StyledScriptEditor was in wrong mode. Fixed on Windows.
            Hide
            jjkparker Joel Parker added a comment -

            Verified as fixed using 2013-02-12 build. Assigning to Tom for any followup GUI testing.

            Show
            jjkparker Joel Parker added a comment - Verified as fixed using 2013-02-12 build. Assigning to Tom for any followup GUI testing.
            Hide
            tgrubb Thomas Grubb added a comment -

            Too hard to make an automated test with multiple programs

            Show
            tgrubb Thomas Grubb added a comment - Too hard to make an automated test with multiple programs

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: