History log of /haiku/src/apps/terminal/HistoryBuffer.cpp
Revision Date Author Comments
# a43a4e9f 25-Apr-2022 Jessica Hamilton <jessica.l.hamilton@gmail.com>

Terminal: fix missing attribute state for the history buffer.

* This presented itself as 24-bit colour rendering as white on black
when scrolling through the history.


# c0b591c5 10-Apr-2022 Jessica Hamilton <jessica.l.hamilton@gmail.com>

Terminal: implement 24-bit colour.

* Changes `TERM` to `xterm`, as we're now a full colour capable terminal
* Removes now-obsolete GuessPaletteColor from an RGB triple
* Since it's using a struct instead of uint32 for attributes, add a bunch
of helpers for a cleaner implementation
* Pass the TerminalBuffer's palette to the foreground/background get
helpers, for when an indexed colour is returned

Change-Id: I33bd3bb1407b87a237a8bc355093fe549e05b43a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5195
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 07d1d01a 11-Apr-2013 Siarzhuk Zharski <zharik@gmx.li>

Fix resize freeze on full-width chars in Terminal history

In the Terminal data model every full width character occupies two cells
in the data buffers. The second cell of such characters is not drawn and
used mainly to differentiate between full width and half width
characters.
Proposed fix zeroes the attributes of the second cell in the
HistoryBuffer::GetTerminalLineAt() that prevents the potential endless
loops in the BasicTerminalBuffer::_ResizeRedraw(). Those loops were
result of the random attributes in full width character's second cells.


# 5b41331f 09-Mar-2013 Siarzhuk Zharski <zharik@gmx.li>

CodeStyle fixes, some refactoring and cleanup

* Clear some codestyle issues catched by checker script;
* Rename RestartDebugCapture to more consistent StartStopDebugCapture;
* Updated Copyrights and authors lists, some occurences of the raw MIT
licence text replaced with "under the terms of MIT licence" reference;
* Fixes for x86_64 build.

This is cumulative cleanup commit for series of Terminal refactoring
changes I have introduced last time. No significant functional changes.


# 73d0eee5 03-Mar-2013 Siarzhuk Zharski <zharik@gmx.li>

Handle char attribute "holes" in Terminal History lines

Previous implementation doesn't care about characters that are not
covered by attributes run length array elements - so the attributes of
the next run array element was taken instead of default one on the
HistoryBuffer::GetTerminalLine() call. Note that this was the case of
"holes" in run array but not the characters after the end of run array
elements.


# 627ced12 28-Nov-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Use a better way to store the attributes for end of line. This should also fix some other bugs, as there were occasionalaccess to out-of-range chars.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39669 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b234b3fc 18-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

The color attributes were lost in scrollback buffer since the 256-color change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38222 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dfa76786 16-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed incorrect access of new lines in AddEmptyLines(). The wrong
lines would be initialized while the right ones might have remained
uninitialized. Could happen only in case that more lines were
scrolled out of the screen than there were in the scroll region.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25985 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 535841fc 15-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

If it extended to the end of the line the length of the last attributes
run of a history line would not be initialized correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25968 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4c9d4b02 14-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Change the line history to a more compact format. We reserve
lines * (width + 8) bytes which is only a little more than a sixth of
what it was before. The effect on performance is relatively small. In
my tests I measured about 2% slowdown.
* Fixed artifacts after soft-wrapped lines.
* Re-enabled cursor blinking. I changed it so that the cursor is 1s
shown and 0.5s hidden (instead of 1s each). Tell me what you think.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25957 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 07d1d01afc6082092782452d1b793c3d1e60c6a6 11-Apr-2013 Siarzhuk Zharski <zharik@gmx.li>

Fix resize freeze on full-width chars in Terminal history

In the Terminal data model every full width character occupies two cells
in the data buffers. The second cell of such characters is not drawn and
used mainly to differentiate between full width and half width
characters.
Proposed fix zeroes the attributes of the second cell in the
HistoryBuffer::GetTerminalLineAt() that prevents the potential endless
loops in the BasicTerminalBuffer::_ResizeRedraw(). Those loops were
result of the random attributes in full width character's second cells.


# 5b41331f1100c78541d87b7ad5a15d5652acb079 09-Mar-2013 Siarzhuk Zharski <zharik@gmx.li>

CodeStyle fixes, some refactoring and cleanup

* Clear some codestyle issues catched by checker script;
* Rename RestartDebugCapture to more consistent StartStopDebugCapture;
* Updated Copyrights and authors lists, some occurences of the raw MIT
licence text replaced with "under the terms of MIT licence" reference;
* Fixes for x86_64 build.

This is cumulative cleanup commit for series of Terminal refactoring
changes I have introduced last time. No significant functional changes.


# 73d0eee58c5c0de2b3b60ff99065bcca688bef72 03-Mar-2013 Siarzhuk Zharski <zharik@gmx.li>

Handle char attribute "holes" in Terminal History lines

Previous implementation doesn't care about characters that are not
covered by attributes run length array elements - so the attributes of
the next run array element was taken instead of default one on the
HistoryBuffer::GetTerminalLine() call. Note that this was the case of
"holes" in run array but not the characters after the end of run array
elements.


# 627ced128beeae81540c683861547413a7664d67 28-Nov-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Use a better way to store the attributes for end of line. This should also fix some other bugs, as there were occasionalaccess to out-of-range chars.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39669 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b234b3fc4e590480b284ec0751a5c7ecc836928e 18-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

The color attributes were lost in scrollback buffer since the 256-color change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38222 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dfa76786b339f20b8c335e479715d66fd21ffc5c 16-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed incorrect access of new lines in AddEmptyLines(). The wrong
lines would be initialized while the right ones might have remained
uninitialized. Could happen only in case that more lines were
scrolled out of the screen than there were in the scroll region.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25985 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 535841fcb50026884677d3bc00b8d388cbce3b3e 15-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

If it extended to the end of the line the length of the last attributes
run of a history line would not be initialized correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25968 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4c9d4b02efb56c9444a83fb99e362681aa14c7c1 14-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Change the line history to a more compact format. We reserve
lines * (width + 8) bytes which is only a little more than a sixth of
what it was before. The effect on performance is relatively small. In
my tests I measured about 2% slowdown.
* Fixed artifacts after soft-wrapped lines.
* Re-enabled cursor blinking. I changed it so that the cursor is 1s
shown and 0.5s hidden (instead of 1s each). Tell me what you think.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25957 a95241bf-73f2-0310-859d-f6bbb57e9c96