1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

DtTerm: fix formatted text in history buffer

Formatted text currently gets corrupted by DtTerm when copied into its
history buffer.

As soon as a line of text is copied into the history, the text of each
segment of formatted text is altered so that it contains the text from
the start of the line.  For example:

    echo -e '\e[1mbold\e[m \e[4munderlined\e[m'

When the text has scrolled off the screen, scrolling back to it reveals:

    boldbbold under

This is fixed by adding the calls to _DtTermPrimBufferGetCharacterPointer
that were missing which would update the buffer pointer when inserting
text into the history buffer.
This commit is contained in:
Stuart Brady 2015-05-05 09:53:07 +01:00 committed by Jon Trulson
parent 51afe76f07
commit 0306c7c6f2

View file

@ -854,6 +854,9 @@ _DtTermPrimFillScreenGap(Widget w)
eCol, eIndex, eValues[eIndex]); eCol, eIndex, eValues[eIndex]);
} }
c1 = _DtTermPrimBufferGetCharacterPointer(
tBuffer, i1, eCol);
(void) _DtTermPrimBufferInsert( (void) _DtTermPrimBufferInsert(
tpd->historyBuffer, tpd->historyBuffer,
tpd->lastUsedHistoryRow, tpd->lastUsedHistoryRow,
@ -879,6 +882,10 @@ _DtTermPrimFillScreenGap(Widget w)
eCol, eIndex, 0); eCol, eIndex, 0);
} }
} }
c1 = _DtTermPrimBufferGetCharacterPointer(
tBuffer, i1, eCol);
(void) _DtTermPrimBufferInsert( (void) _DtTermPrimBufferInsert(
tpd->historyBuffer, tpd->historyBuffer,
tpd->lastUsedHistoryRow, tpd->lastUsedHistoryRow,