shared

package
v0.0.0-...-77bfbca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2023 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Contains share types for the editor

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbsoluteCharacterRange

type AbsoluteCharacterRange struct {
	Start int
	End   int
}

TODO -- this might be useful for clarifying the exact position of the character selection

type Position

type Position struct {
	Col int
	Row int
}

Position represents a cursor position in a multi-row selection. Both row and column values start from 1

type TextSelection

type TextSelection struct {
	CursorPosition Position // cursor position, using rows and columns
	Content        string
	SelectionStart Position // beginning position of the selection
}

TextSelection represents the position and content of the editor's current text selection

func (TextSelection) HasSelection

func (s TextSelection) HasSelection() bool

HasSelection returns true if there is a current text selection

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL