From: Stuart Brady Date: Tue, 5 May 2015 08:53:07 +0000 (+0100) Subject: DtTerm: fix formatted text in history buffer X-Git-Tag: 2.2.3~6 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0306c7c6f2129397d8671ace31fd29cfea2a6739;p=oweals%2Fcde.git 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. --- diff --git a/cde/lib/DtTerm/TermPrim/TermPrimRender.c b/cde/lib/DtTerm/TermPrim/TermPrimRender.c index 3f250f01..95827954 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimRender.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimRender.c @@ -854,6 +854,9 @@ _DtTermPrimFillScreenGap(Widget w) eCol, eIndex, eValues[eIndex]); } + c1 = _DtTermPrimBufferGetCharacterPointer( + tBuffer, i1, eCol); + (void) _DtTermPrimBufferInsert( tpd->historyBuffer, tpd->lastUsedHistoryRow, @@ -879,6 +882,10 @@ _DtTermPrimFillScreenGap(Widget w) eCol, eIndex, 0); } } + + c1 = _DtTermPrimBufferGetCharacterPointer( + tBuffer, i1, eCol); + (void) _DtTermPrimBufferInsert( tpd->historyBuffer, tpd->lastUsedHistoryRow,