winpty icon indicating copy to clipboard operation
winpty copied to clipboard

Feature request: Add redundant \r on line wrap

Open rovf opened this issue 4 years ago • 0 comments

This feature request evolves from a discussion about mintty not working correctly with the new winpty anymore.The problem is that copying a line longer than the terminal width, which is being output by a typical Windows console (i.e. non-Cygwin) program from the mintty terminal, causes a hard line break being inserted in the copied string, because the controlling terminal (mintty in this case), can not recognize whether the line is really a long line having been wrapped around, or two short lines, where the first of these happened to be exactly the Window width.

Since there seems to be no really good alternative, the mintty maintainer suggested that winpty would output \r\r\n, if there is a wrap around of the line. The redundant \r would signal to the controlling terminal, that a line wrap has occured.

rovf avatar Apr 01 '20 12:04 rovf