Right click to paste in Alternate Buffer mode (#13234)

This commit is contained in:
Tommaso Sciortino
2025-11-17 15:48:33 -08:00
committed by GitHub
parent 1d1bdc57ce
commit 8877c85278
10 changed files with 172 additions and 523 deletions
@@ -2040,6 +2040,11 @@ export function useTextBuffer({
[visualLayout],
);
const getOffset = useCallback(
(): number => logicalPosToOffset(lines, cursorRow, cursorCol),
[lines, cursorRow, cursorCol],
);
const returnValue: TextBuffer = useMemo(
() => ({
lines,
@@ -2065,6 +2070,7 @@ export function useTextBuffer({
replaceRange,
replaceRangeByOffset,
moveToOffset,
getOffset,
moveToVisualPosition,
deleteWordLeft,
deleteWordRight,
@@ -2129,6 +2135,7 @@ export function useTextBuffer({
replaceRange,
replaceRangeByOffset,
moveToOffset,
getOffset,
moveToVisualPosition,
deleteWordLeft,
deleteWordRight,
@@ -2283,6 +2290,7 @@ export interface TextBuffer {
endOffset: number,
replacementText: string,
) => void;
getOffset: () => number;
moveToOffset(offset: number): void;
moveToVisualPosition(visualRow: number, visualCol: number): void;