Dyalog / ride

Cross-platform IDE for Dyalog APL
https://dyalog.github.io/ride
MIT License
203 stars 31 forks source link

Editor opened on a vector of character vectors turns carriage returns into empty character vectors #602

Closed dyavc closed 2 years ago

dyavc commented 4 years ago

Describe the issue you are having

Editor opened on a vector of character vectors turns carriage returns into empty character vectors

Did you connect to an already running interpreter or start the interpreter from RIDE?

Started an interpreter

How do you reproduce the issue?

cr←⎕ucs 13 a←(cr,'abc')(cr,'def') ⍴a 2 )ed a ⍝ Just open and close, no editing done ⍴a 4

Paste the contents of Help → About (Shift+F1)

IDE: Version: 4.3.3463 Platform: Win32 Date: 2020-07-07 10:44:21 +0100 Git commit: 0cd6e9faf39a5d6a5f5caa94d1ff51743d5cdd75 Preferences:{ "selectedExe":"C:\Program Files\Dyalog\Dyalog APL-64 18.0 Unicode\dyalog.exe" }

Interpreter: Version: 18.0.38859 Platform: Windows-64 Edition: Unicode/64 Date: Aug 6 2020 at 10:15:20

abrudz commented 2 years ago

It would be acceptable for RIDE to open this in a read-only mode.

e9gille commented 2 years ago

I've had a go at this and decided to opt for @abrudz suggestion with the addition that embedded CR LF characters are replaced with the symbols and . This doesn't work when opening the editor on single character arrays as they come across rendered as two empty strings from the interpreter.

e9gille commented 2 years ago

Fixed in 75fc888f1bed943dbf8fc2b9a0178d32d18b7482