Merge branch 'master' into buffer_optimizations

This commit is contained in:
Jörg Breitbart
2022-12-03 11:24:51 +01:00
85 changed files with 1502 additions and 1015 deletions
+3 -4
View File
@@ -33,8 +33,7 @@ export class Buffer implements IBuffer {
public x: number = 0;
public scrollBottom: number;
public scrollTop: number;
// TODO: Type me
public tabs: any;
public tabs: { [column: number]: boolean | undefined } = {};
public savedY: number = 0;
public savedX: number = 0;
public savedCurAttrData = DEFAULT_ATTR_DATA.clone();
@@ -513,7 +512,7 @@ export class Buffer implements IBuffer {
* TODO: respect trim flag after fixing #1685
* @param lineIndex line index the string was retrieved from
* @param stringIndex index within the string
* @param startCol column offset the string was retrieved from
* @param trimRight Whether to trim whitespace to the right.
*/
public stringIndexToBufferIndex(lineIndex: number, stringIndex: number, trimRight: boolean = false): BufferIndex {
while (stringIndex) {
@@ -542,7 +541,7 @@ export class Buffer implements IBuffer {
* Wide characters will count as two columns in the resulting string. This
* function is useful for getting the actual text underneath the raw selection
* position.
* @param line The line being translated.
* @param lineIndex The absolute index of the line being translated.
* @param trimRight Whether to trim whitespace to the right.
* @param startCol The column to start at.
* @param endCol The column to end at.