@@ -41,7 +41,15 @@ public String getTranscriptText() {
4141 return getSelectedText (0 , -getActiveTranscriptRows (), mColumns , mScreenRows ).trim ();
4242 }
4343
44+ public String getTranscriptTextWithoutJoinedLines () {
45+ return getSelectedText (0 , -getActiveTranscriptRows (), mColumns , mScreenRows , false ).trim ();
46+ }
47+
4448 public String getSelectedText (int selX1 , int selY1 , int selX2 , int selY2 ) {
49+ return getSelectedText (selX1 , selY1 , selX2 , selY2 , true );
50+ }
51+
52+ public String getSelectedText (int selX1 , int selY1 , int selX2 , int selY2 , boolean joinBackLines ) {
4553 final StringBuilder builder = new StringBuilder ();
4654 final int columns = mColumns ;
4755
@@ -79,7 +87,8 @@ public String getSelectedText(int selX1, int selY1, int selX2, int selY2) {
7987 }
8088 if (lastPrintingCharIndex != -1 )
8189 builder .append (line , x1Index , lastPrintingCharIndex - x1Index + 1 );
82- if (!rowLineWrap && row < selY2 && row < mScreenRows - 1 ) builder .append ('\n' );
90+ if ((!joinBackLines || !rowLineWrap )
91+ && row < selY2 && row < mScreenRows - 1 ) builder .append ('\n' );
8392 }
8493 return builder .toString ();
8594 }
0 commit comments