Skip to content

[Bug] Issue with copypasting large volumes of tabbed text #3952

@divyam27-1

Description

@divyam27-1

Take the following code:

void main()
{
    import std.algorithm, std.stdio;

    "Starting program".writeln;

    enum a = [ 3, 1, 2, 4, 0 ];
    // Sort data at compile-time
    static immutable b = sort(a);

    // Print the result _during_ compilation
    pragma(msg, "Finished compilation: ", b);
}

Open micro on windows cmd

Image

Now paste the code into the program. Output you get:

Image

This is not supposed to be the output. I assume there is some bug with the \r operation (return to start) while printing to the terminal in Windows. So it is printing to the same tablevel it already was + adding any prior tab levels which causes line by line increase in tablevels. This is consistent across all programming languages and not just Dlang.

Output is supposed to be like this:

Image Image

(latest version of micro used)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions