mirror of
				https://github.com/Maks1mS/bubbles.git
				synced 2025-10-31 05:42:01 +03:00 
			
		
		
		
	Add cursor positioning functions to viewport renderder
This commit is contained in:
		| @@ -95,3 +95,11 @@ func clearLine(w io.Writer) { | ||||
| func insertLine(w io.Writer, numLines int) { | ||||
| 	fmt.Fprintf(w, te.CSI+"%dL", numLines) | ||||
| } | ||||
|  | ||||
| func saveCursorPosition(w io.Writer) { | ||||
| 	fmt.Fprint(w, te.CSI+"s") | ||||
| } | ||||
|  | ||||
| func restoreCursorPosition(w io.Writer) { | ||||
| 	fmt.Fprint(w, te.CSI+"u") | ||||
| } | ||||
|   | ||||
| @@ -21,8 +21,8 @@ type Model struct { | ||||
| 	// It's used in high performance rendering. | ||||
| 	Y int | ||||
|  | ||||
| 	// UseInternalRenderer specifies whether or not to use the pager's internal, | ||||
| 	// high performance renderer to paint the screen. | ||||
| 	// UseInternalRenderer specifies whether or not to use the pager's | ||||
| 	// internal, high performance renderer to paint the screen. | ||||
| 	UseInternalRenderer bool | ||||
|  | ||||
| 	lines []string | ||||
|   | ||||
		Reference in New Issue
	
	Block a user