MATLAB-extension-for-vscode icon indicating copy to clipboard operation
MATLAB-extension-for-vscode copied to clipboard

Printing a table with many columns wraps the lines, making it hard to read

Open robertoffmoura opened this issue 3 months ago • 1 comments

Describe the bug If we print a table with many columns on the terminal, the line wrapping makes it very hard to read. Pressing alt + z (workbench.action.terminal.sizetoContentWidth) and printing the table again fixes the issue. But ideally we shouldn't need to press this keyboard shortcut and print the table again: it would be good if the width of the terminal expanded to fit the size of the table automatically.

To Reproduce Steps to reproduce the behavior:

tb = table();
for i = 1:40
    tb.("column" + i) = rand(5,1);
end

Type tb in the terminal. See that the lines wrap around:

Image

Expected behavior I expected the terminal width to automatically increase so that it fits the whole table:

Image

Useful Information MATLAB Version: '24.2.0.2740171 (R2024b) Update 1' VS Code Version: 1.85.2 (system setup) Commit: 8b3775030ed1a69b13e4f4c628c612102e30a681 Date: 2024-01-18T06:40:10.514Z Electron: 25.9.7 ElectronBuildId: 26354273 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.19045 Extension Version: 1.3.6

robertoffmoura avatar Nov 10 '25 12:11 robertoffmoura

Thanks for reporting this issue. This is something that we can consider improving in the future. You mentioned one workaround, but another is to use VS Code's "Set Fixed Dimensions" command to update the width of the terminal at the start of the session. Unfortunately it doesn't seem like updating it programmatically or setting some sort of default is possible today based on my research.

philipb314 avatar Nov 12 '25 18:11 philipb314