vscode-ibmi icon indicating copy to clipboard operation
vscode-ibmi copied to clipboard

Got tabs replaced by literal '\t' when saving

Open jkyeung opened this issue 2 years ago • 7 comments

Describe the bug When saving tab characters back to the IBM i, the string '\t' (that is, the two-character string composed of a literal backslash and a literal 't') get written into the source member.

To Reproduce

  1. Open a source member in VS Code.
  2. Set indentation to "Indent Using Tabs".
  3. Insert a tab.
  4. Save.

Expected behavior A tab character in the appropriate CCSID gets written to the source member.

Screenshots

SEU before editing: 2022-12-21a (SEU before edits)

Open in VS Code: 2022-12-21b (VS Code before edits)

Setting indent mode: 2022-12-21c (indent using tabs)

Code containing tab: 2022-12-21d (insert tab into code)

SEU after saving: 2022-12-21e (SEU after saving in VS Code)

Environment (please complete the following information):

  • Code for IBM i v1.6.8
  • IBM i OS version 7.4

Additional context I realize you would rarely want actual tabs in your code, especially if it will also be worked on with SEU. But if the tabs are already there in the source member on the IBM i, VS Code opens them as tabs, and they need to make the round-trip intact.

jkyeung avatar Dec 21 '22 22:12 jkyeung