vscode-ibmi
vscode-ibmi copied to clipboard
Update tab conversion; address issue #996
Changes
- Updated the escapeString function in extendedContent.ts to convert the UTF-8 tab character
\tto0x05(the EBCDIC tab character).
How to test this PR
- Open VS Code. Connect to any IBM i machine.
- In the connection settings under Source Code, turn on Enable Source Dates and set Source Date tracking mode to "Diff mode."
- Create a new source member.
- Run the "Indent Using Tabs" VS Code command to configure the behavior of the Tab key.
- At the beginning of any line, press the Tab key; the UTF-8 tab character
\t(not a series of individual spaces) should be prepended to the line. - Save the source member, then close it.
- Open Access Client Solutions. Use the 5250 emulator to connect to the same IBM i machine as before.
- Run SEU. Open the newly-created source member.
- Verify that SEU renders the previously-inserted tab character as a blank space (not as a backslash followed by a lowercase t).
- Close SEU. Return to VS Code.
- Reopen the new member. Verify that VS Code renders the previously-inserted tab character as it did before.
Checklist
- [x] have tested my change
- [x] have created one or more test cases
- [ ] updated relevant documentation
- [x] Remove any/all
console.logs I added - [x] have added myself to the contributors' list in CONTRIBUTING.md
I'm coming across a similar issue. I have an existing SQL source member in my QSQLDDLSRC file that was created either in RDI or the green screen, I'm not sure which. It is for creating a stored procedure. I copied it into my project library and opened it with VS Code. I made a minor change to the source code, saved it and exited. When I reopened the source member most of the lines in the member now have the \t in front of them. So far this has only happened to me with an SQL member, none of my RPGLE source code has had this happen yet.
I tried turning off the 'Enable Source Dates' and no longer had this happen, but we use source dates, so I don't want them to be wiped out if I open an existing source member in VS Code to make a modification.
@casweet72 This PR should solve that issue!
@steph-beneschan-256 Thanks for your PR, once again!
I would like to write a test case for this PR. Do you mind if I add some commits to add a test case for it?
@worksofliam So sorry I missed your message! Sounds good, please add the commits.
So sorry, I'll look at the issue tonight if that's okay