History log of /haiku/src/apps/terminal/BasicTerminalBuffer.h
Revision Date Author Comments
# 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>


# 242adb20 06-Jan-2021 Jérôme Duval <jerome.duval@gmail.com>

Terminal: implement ECMA-48 "REP"

fix #16724

Change-Id: Ie9f8252393a65a0101a6d78db2360f48bb52bc73
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3607
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 62eadc5e 09-Nov-2016 Jérôme Duval <jerome.duval@gmail.com>

Terminal: implement index and next-line CSI sequences.

* also ignore 0xa, 0xb, 0xc control characters in CSI sequences.


# ecfaa77a 03-Nov-2016 Jérôme Duval <jerome.duval@gmail.com>

Terminal: Implement a few cursor CSI commands.

* Cursor back tab, cursor forward tab.
* Cursor next line, cursor previous line.
* also add size 13 to the list of font sizes.


# 314e8a20 10-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BasicTerminalBuffer: Add {Previous,Next}LinePos()


# 3d149248 03-Apr-2013 Siarzhuk Zharski <zharik@gmx.li>

Fix support of East Asian Full Width characters

* Re-enable full-width characters detection and display;
* Fix cursor drawing on full-width characters;
* Fix debug dump for multi-byte characters;
* Fix file permissions for debug capture log.

Fixes #6717. Also may improve behaviour related to #6227.


# e0fcd629 27-Mar-2013 Siarzhuk Zharski <zharik@gmx.li>

Code style fixes. No functional changes.

Fix for some code style issues pointed out by Axel. Thanks.


# daebca78 21-Mar-2013 Siarzhuk Zharski <zharik@gmx.li>

More standard handling G0,G1,G2,G3 graph.char sets

Handling of graphic character sets G0-G3 is fixed and implemented in
more consistent, extensible way.


# 1dd3b537 16-Mar-2013 Siarzhuk Zharski <zharik@gmx.li>

Fix Alternate/Normal screen's current attributes handling

Handle the current attributes of the TextBuffer consistently with other
Alt/Normal buffer sensitive variables. That fixes, for example, issues
with wrong background coloring of new lines in normal text buffer after
maximizing the terminal window running applications (like MC) performing
output onto alternate screen.


# 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.


# b0b7933e 07-Feb-2013 Siarzhuk Zharski <zharik@gmx.li>

Use stack for storing saved cursor positions

That fixes issue with latest versions of Midnight Commander - it
"restores" on exit the latest postion was set, that is equal to 0.0.


# b512213b 31-Jan-2013 Siarzhuk Zharski <zharik@gmx.li>

Support Background Color Erase, switch to xterm-256color

* Lot of fixes to add support of BCE (background color erase). Shell
is switched to emulate xterm-256colors terminal, that is modern and
declare the colors capabilities of our Terminal more precisely;
* Move current character attributes fAttr from TermView to
BasicTerminalBuffer. This reduces count of function parameters on call
various InsertXXX routines;
* In alternative screen buffer mode the whole cells "matrix" of the
screen buffers is taken into account during drawing background of the
cells in the view. In normal mode the "attributes" field of the
TerminalLine is used to detect color of the area after the last
character - there should be no changes with previous behaviour;
* Fix attributes on kSpaceChar-padding short lines. Current _line_
attributes should be used instead of current _global_ attributes;
* Fixed pads and gaps attributes, more accurate handling of ESC[K and K°;
* _Invalidate strings just erased. Fix EraseChars DCH processing;
* Fixes for ESC[J erase lines control sequences;
* Added handling SGR 90-97, 100-107 codes;
* Clean the newly allocated TerminalLine lines;
* More precise cursor background [off-]color estimation at ends of
lines. The current line attributes should be used instead of
hard-coding it to fTextBackground;
* Fixed background color erase in normal screen buffer modes. Wrong
line indexes calculation messed the drawing results or just returned
0 [default] line attributes;
* Some more BCE support: TerminalLine::Clear() now honors current
character attributes;
* Fixes #6143, #6510 and #6424.


# 718a28ce 30-Jan-2013 Siarzhuk Zharski <zharik@gmx.li>

Add Debug snapshots and capture of Terminal data flow

Two helper functions introduced: "make debug snapshots" triggered by
Ctrl-Cmd-S shortcut and "capture data flow" triggered by Ctrl-Cmd-C
shortcut. The first one makes debug dump of current data both in visual
and in text buffer, including history lines if they available. The second
one mirrors all characters and control sequences that are flowing
through the Parser. Both dump and capture files are saved under /var/log
folder. That functionality available only if the USE_DEBUG_SNAPSHOTS switch is
defined.


# a2f89c58 02-Feb-2012 Siarzhuk Zharski <zharik@gmx.li>

[Coverity] Fixed some uninit fields and return values checks

* Fixed CID2398, CID9945, CID9943, CID4215


# 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


# fa8c3f10 23-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Added IsAlternateScreenActive().


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


# a7538599 22-Nov-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Insert an extra space when doing a CR. This ensures the latest attribute setup gets inserted somehow in the line before we go elsewhere.
This gets 256colors.pl to give the right output, as well as useable vim in TERM=xterm-color mode (as far as I can tell).


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


# 384fe022 22-Nov-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Use the attributes from the parser instead of trying to guess blindly when inserting a tab. This avoids strange things hapenning when a tab is inserted at the start of a line.


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


# 6100b6aa 13-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Enlarge attributes to 32 bit instead of 16. This prepares 256-color support for terminal.


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


# 630426d6 27-Sep-2009 Rene Gollent <anevilyak@gmail.com>

Patch by Joshua R. Elsasser:

Implement correctly handling tab stop escape sequences.

Resolves ticket #4657. Thanks!



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


# 138343f4 27-Sep-2009 Rene Gollent <anevilyak@gmail.com>

Patch by Joshua R. Elsasser:

Implement DECALN escape sequence.

Resolves ticket #4658. Thanks!



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


# ae29b1c3 27-Sep-2009 Rene Gollent <anevilyak@gmail.com>

Patch by Joshua R. Elsasser:

Implement origin mode.
Save origin mode and text attributes when saving the cursor.
Have RI respect the scroll region.
When erasing the screen actually erase the screen, not just the scroll region.
Implement all three variants of the EL (erase line) sequence.

Thanks! Resolves ticket #4652.



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


# 80abc271 14-Aug-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Changed the Ctrl-L behavior: The current screen is now scrolled up completely
instead of actually clearing it, so that it is still in the history.


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


# 48bbdc1c 14-Aug-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed broken indentation (greetings to Stefano :-)).


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


# f498be92 03-Feb-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Applied patch by h.z. (slightly modified by myself) included in bug #2715. I tested it briefly with Konatu Tohaba font and it seems to work correctly. Please review.

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


# bb69160b 11-Jul-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Changed GetStringFromRegion() to not insert '\n' for soft line breaks.
Fixes bug #2515.


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


# b43255b9 19-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Squashed TODO: When writing a character in the last column of a line we
wrapped to the next line and a subsequent LF would advance another line.
We behave like xterm now, i.e. visually the cursor stays on the same
line (on the last character), but the next character will be wrapped to
the next line.


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


# d04aae8b 17-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Some preparations for DEC private mode settings support.
* Implemented alternate screen buffer support. Not used by any program
yet, since we still use the beterm termcap entry.


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


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

Added support for \ESC[%dX (erase characters).


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


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

* Fixed \ESC[0J (erase screen below). It shall not erase any character
on the line before the cursor.
* Implemented \ESC[1J (erase screen above.
* Fixed \ESC[2J (erase all). It shall not move the cursor.
* When scrolling only the top part of the screen, we do now also
invalidate the line below the scroll region. Otherwise the view
wouldn't know that they have not been scrolled.


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


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

Support for \ESC[%dS (scroll screen up).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25982 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


# 90ab7ea3 10-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added a SetHistoryCapacity() method.
* Added a ResizeTo() version that allows to set the history capacity at
the same time.
* Added a SynchronizeWith() method that allows synchronizing with (a
part of) another buffer.
* Fixed TODO in _Scroll().
* Improved the dirty region update code in _Scroll(). It would in
certain (not exactly uncommon) situations needlessly invalidate the
whole screen.


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


# 23450280 09-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Pulled base class BasicTerminalBuffer out of TerminalBuffer. It contains
pretty much all the meaty code. Left in TerminalBuffer is only stuff
that didn't quite fit, like the encoding and view notifications.


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


# 314e8a20c6828d67b6f4c2362710c0a9ae27bc08 10-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BasicTerminalBuffer: Add {Previous,Next}LinePos()


# 3d1492487d880a3518397a6326bc7fe26228ccf6 03-Apr-2013 Siarzhuk Zharski <zharik@gmx.li>

Fix support of East Asian Full Width characters

* Re-enable full-width characters detection and display;
* Fix cursor drawing on full-width characters;
* Fix debug dump for multi-byte characters;
* Fix file permissions for debug capture log.

Fixes #6717. Also may improve behaviour related to #6227.


# e0fcd6291689c1a02f86e60262c8f1d3c0f23dca 27-Mar-2013 Siarzhuk Zharski <zharik@gmx.li>

Code style fixes. No functional changes.

Fix for some code style issues pointed out by Axel. Thanks.


# daebca78f8edce18e967705c7e7c00e0b4c43e23 21-Mar-2013 Siarzhuk Zharski <zharik@gmx.li>

More standard handling G0,G1,G2,G3 graph.char sets

Handling of graphic character sets G0-G3 is fixed and implemented in
more consistent, extensible way.


# 1dd3b537c3d9e3545d78c50cc26775174eec2051 16-Mar-2013 Siarzhuk Zharski <zharik@gmx.li>

Fix Alternate/Normal screen's current attributes handling

Handle the current attributes of the TextBuffer consistently with other
Alt/Normal buffer sensitive variables. That fixes, for example, issues
with wrong background coloring of new lines in normal text buffer after
maximizing the terminal window running applications (like MC) performing
output onto alternate screen.


# 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.


# b0b7933ee7fb52833ec82118e00a6c085b4a4237 07-Feb-2013 Siarzhuk Zharski <zharik@gmx.li>

Use stack for storing saved cursor positions

That fixes issue with latest versions of Midnight Commander - it
"restores" on exit the latest postion was set, that is equal to 0.0.


# b512213be6f7cf9660c07e24a81b7597c8776116 31-Jan-2013 Siarzhuk Zharski <zharik@gmx.li>

Support Background Color Erase, switch to xterm-256color

* Lot of fixes to add support of BCE (background color erase). Shell
is switched to emulate xterm-256colors terminal, that is modern and
declare the colors capabilities of our Terminal more precisely;
* Move current character attributes fAttr from TermView to
BasicTerminalBuffer. This reduces count of function parameters on call
various InsertXXX routines;
* In alternative screen buffer mode the whole cells "matrix" of the
screen buffers is taken into account during drawing background of the
cells in the view. In normal mode the "attributes" field of the
TerminalLine is used to detect color of the area after the last
character - there should be no changes with previous behaviour;
* Fix attributes on kSpaceChar-padding short lines. Current _line_
attributes should be used instead of current _global_ attributes;
* Fixed pads and gaps attributes, more accurate handling of ESC[K and K°;
* _Invalidate strings just erased. Fix EraseChars DCH processing;
* Fixes for ESC[J erase lines control sequences;
* Added handling SGR 90-97, 100-107 codes;
* Clean the newly allocated TerminalLine lines;
* More precise cursor background [off-]color estimation at ends of
lines. The current line attributes should be used instead of
hard-coding it to fTextBackground;
* Fixed background color erase in normal screen buffer modes. Wrong
line indexes calculation messed the drawing results or just returned
0 [default] line attributes;
* Some more BCE support: TerminalLine::Clear() now honors current
character attributes;
* Fixes #6143, #6510 and #6424.


# 718a28ceadb872b766b13cb3743c575fe416e501 30-Jan-2013 Siarzhuk Zharski <zharik@gmx.li>

Add Debug snapshots and capture of Terminal data flow

Two helper functions introduced: "make debug snapshots" triggered by
Ctrl-Cmd-S shortcut and "capture data flow" triggered by Ctrl-Cmd-C
shortcut. The first one makes debug dump of current data both in visual
and in text buffer, including history lines if they available. The second
one mirrors all characters and control sequences that are flowing
through the Parser. Both dump and capture files are saved under /var/log
folder. That functionality available only if the USE_DEBUG_SNAPSHOTS switch is
defined.


# a2f89c5843433b8d93a96fc2cfc98c29ddc628f8 02-Feb-2012 Siarzhuk Zharski <zharik@gmx.li>

[Coverity] Fixed some uninit fields and return values checks

* Fixed CID2398, CID9945, CID9943, CID4215


# 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


# fa8c3f10658df2a8a4b63ad4c13e1dbe10a6e3b9 23-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Added IsAlternateScreenActive().


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


# a753859956cf27660c5dffc55ee46be840790366 22-Nov-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Insert an extra space when doing a CR. This ensures the latest attribute setup gets inserted somehow in the line before we go elsewhere.
This gets 256colors.pl to give the right output, as well as useable vim in TERM=xterm-color mode (as far as I can tell).


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


# 384fe0223480bf613f2978f386ce5d4f15dc3b4c 22-Nov-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Use the attributes from the parser instead of trying to guess blindly when inserting a tab. This avoids strange things hapenning when a tab is inserted at the start of a line.


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


# 6100b6aa33a6eaad0d5324a7da8718a8d5f5d1f7 13-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Enlarge attributes to 32 bit instead of 16. This prepares 256-color support for terminal.


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


# 630426d679a4db217ef474d72beebe495f1473f3 27-Sep-2009 Rene Gollent <anevilyak@gmail.com>

Patch by Joshua R. Elsasser:

Implement correctly handling tab stop escape sequences.

Resolves ticket #4657. Thanks!



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


# 138343f4f82e211fad68338633970d4d6657ba20 27-Sep-2009 Rene Gollent <anevilyak@gmail.com>

Patch by Joshua R. Elsasser:

Implement DECALN escape sequence.

Resolves ticket #4658. Thanks!



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


# ae29b1c3c2700bb410324dc8157860043c826cd9 27-Sep-2009 Rene Gollent <anevilyak@gmail.com>

Patch by Joshua R. Elsasser:

Implement origin mode.
Save origin mode and text attributes when saving the cursor.
Have RI respect the scroll region.
When erasing the screen actually erase the screen, not just the scroll region.
Implement all three variants of the EL (erase line) sequence.

Thanks! Resolves ticket #4652.



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


# 80abc2712f495a167b07746db3b3acaaa8641253 14-Aug-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Changed the Ctrl-L behavior: The current screen is now scrolled up completely
instead of actually clearing it, so that it is still in the history.


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


# 48bbdc1c1765ba67e32e0c25a131c9618765e445 14-Aug-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed broken indentation (greetings to Stefano :-)).


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


# f498be9297862dda8330e3dae2b730afba2570cd 03-Feb-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Applied patch by h.z. (slightly modified by myself) included in bug #2715. I tested it briefly with Konatu Tohaba font and it seems to work correctly. Please review.

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


# bb69160b48492a44b15015dbf0abcc12c2709fa4 11-Jul-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Changed GetStringFromRegion() to not insert '\n' for soft line breaks.
Fixes bug #2515.


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


# b43255b9f734ffd7158599585a4bfae635bcd7e2 19-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Squashed TODO: When writing a character in the last column of a line we
wrapped to the next line and a subsequent LF would advance another line.
We behave like xterm now, i.e. visually the cursor stays on the same
line (on the last character), but the next character will be wrapped to
the next line.


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


# d04aae8b80964ab6a3ab7725baf930d2320d4133 17-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Some preparations for DEC private mode settings support.
* Implemented alternate screen buffer support. Not used by any program
yet, since we still use the beterm termcap entry.


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


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

Added support for \ESC[%dX (erase characters).


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


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

* Fixed \ESC[0J (erase screen below). It shall not erase any character
on the line before the cursor.
* Implemented \ESC[1J (erase screen above.
* Fixed \ESC[2J (erase all). It shall not move the cursor.
* When scrolling only the top part of the screen, we do now also
invalidate the line below the scroll region. Otherwise the view
wouldn't know that they have not been scrolled.


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


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

Support for \ESC[%dS (scroll screen up).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25982 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


# 90ab7ea343a42cda7da1969de489aca81d462969 10-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added a SetHistoryCapacity() method.
* Added a ResizeTo() version that allows to set the history capacity at
the same time.
* Added a SynchronizeWith() method that allows synchronizing with (a
part of) another buffer.
* Fixed TODO in _Scroll().
* Improved the dirty region update code in _Scroll(). It would in
certain (not exactly uncommon) situations needlessly invalidate the
whole screen.


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


# 234502808a662a88165c2fed4d3dcf382f59650d 09-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Pulled base class BasicTerminalBuffer out of TerminalBuffer. It contains
pretty much all the meaty code. Left in TerminalBuffer is only stuff
that didn't quite fit, like the encoding and view notifications.


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