Commit Graph

511 Commits

Author SHA1 Message Date
Christian Rocha 5ec2c0712a
Move cursor to (0,0) when entering the altscreen
This should fix cases in some terminals where the following paint is
vertically offset.
2020-06-22 20:47:35 -04:00
Christian Rocha d86cb562f0
Add basic mouse support 2020-06-22 20:41:26 -04:00
Christian Rocha 3a70ecdde1
Use same output for altscreen stuff as everything else 2020-06-22 15:55:52 -04:00
Christian Rocha 05f3028452
Move cursor in a relative fashion in standard render (fixes inline rendering) 2020-06-22 14:35:46 -04:00
Christian Rocha 719d246edd
Bump dependencies 2020-06-22 13:54:16 -04:00
Christian Rocha 8bab4bce9a
Actively place the cursor after a normal render 2020-06-22 13:40:44 -04:00
Christian Rocha ebbab2908c
Put cursor back where we found it after scrolling 2020-06-22 13:40:44 -04:00
Christian Rocha eff99294e1
We actually never needed to correct the top boundary 2020-06-22 13:40:44 -04:00
Christian Rocha 6e75920859
Stay in-bounds when clearing lines 2020-06-22 13:40:44 -04:00
Christian Rocha c0ce48dfdd
Fix repaint when syncing and clearing scroll area 2020-06-22 13:40:44 -04:00
Christian Rocha 673752658f
Comments and cleanup 2020-06-22 13:40:32 -04:00
Christian Rocha bbcdb3ac1f
Render scroll area before other stuff when resizing 2020-06-19 13:27:50 -04:00
Christian Rocha 468b98d2eb
Comments in the pager example 2020-06-19 13:22:08 -04:00
Christian Rocha 9cf57efe5f
Fix pager footer positioning 2020-06-19 12:29:59 -04:00
Christian Rocha 2a297fabad
Also repaint non-scrolling stuff when resizing 2020-06-19 11:51:36 -04:00
Christian Rocha 6bd34bdd14
Remove commands for manually getting terminal size; no longer needed
Tea core now sends the terminal dimensions on start and when the window
is resized (except on Windows where SIGWINCH, the resize signal, is not
supported).
2020-06-18 22:47:17 -04:00
Christian Rocha a2897e9dd1
Remove messages and commands we don't need yet 2020-06-18 22:42:29 -04:00
Christian Rocha 603eaa27a6
Update pager example to use high performance renderer 2020-06-18 21:09:08 -04:00
Christian Rocha 00f7f5be93
Remove cursor save/restore as it was wrecking things
Also, um, we didn't need it.
2020-06-18 20:10:20 -04:00
Christian Rocha d4d553c447
Back to a line-based renderer 2020-06-18 19:18:37 -04:00
Christian Rocha da9a1fe2f4
Correct scroll area top positioning 2020-06-18 17:21:48 -04:00
Christian Rocha 8e616c4c0c
Just listen for tea.WindowSizeMsg to get terminal dimensions 2020-06-18 13:54:12 -04:00
Christian Rocha 116ab34eb8
Sync pager viewport when starting up and resizing 2020-06-18 12:33:58 -04:00
Christian Rocha 6ea16d0b9c
Add command to sync scrollable area with renderer
This is necessary for initial paints, and probably for resizes.
2020-06-18 12:23:42 -04:00
Christian Rocha 83e41c15b1
Create ignoreLines map on demand 2020-06-18 12:20:14 -04:00
Christian Rocha 902225116c
Correct "scroll down" behavior 2020-06-17 20:24:43 -04:00
Christian Rocha 2110a923ab
Use high performance rendering in pager example 2020-06-17 19:43:33 -04:00
Christian Rocha a6deb077c5
Adjust comments 2020-06-17 19:43:19 -04:00
Christian Rocha 4dc6992767
Cmds for scrolling + handle renderer msgs in a renderer method 2020-06-17 18:46:04 -04:00
Christian Rocha a492302609
Adjust exports of new msgs + add msg to replace ignored lines 2020-06-17 18:19:27 -04:00
Christian Rocha 4d68ed07ef
Add header and footer to pager example 2020-06-17 15:00:13 -04:00
Christian Rocha 8539cfcf8c
Fix a bug where left area on the first line was not always cleared 2020-06-17 14:50:39 -04:00
Christian Rocha debaf312f7
Disable resize listening on windows since it's not supported 2020-06-17 12:27:16 -04:00
Christian Rocha a152cce4b6
Adjust comments + move some code around 2020-06-17 12:12:45 -04:00
Christian Rocha ae9ea29c0e
Fix line clearing bug 2020-06-17 11:49:33 -04:00
Christian Rocha 090c983bd5
Bump termenv and futher integrate it into terminal controls 2020-06-17 11:17:41 -04:00
Christian Rocha 830beecffb
Fix render's view clearing loop 2020-06-17 10:48:08 -04:00
Christian Rocha 217c506a49
Add logging option in simple example 2020-06-16 22:32:06 -04:00
Christian Rocha b72009105b
Fix infinte loop + backwards ignore behavior 2020-06-16 22:30:47 -04:00
Christian Rocha 683473c26d
Blind pass at adding high performance scrolling into the renderer 2020-06-16 22:06:46 -04:00
Christian Rocha da86f9ac1a
Renderer comments 2020-06-16 11:05:10 -04:00
Christian Rocha 01032f0579
Set FPS in a more readable fashion (thanks @muesli!) 2020-06-15 20:01:18 -04:00
Christian Rocha 45f62bad33
Add go-runewidth to resources in README 2020-06-11 21:51:52 -04:00
Christian Rocha 3aba272a10
Fix nonsensical comment 2020-06-11 21:42:40 -04:00
Christian Rocha 5ccb786eec
Um, the package is called Bubble Tea, thank-you-very-much 2020-06-11 19:34:08 -04:00
Christian Rocha 55a8d1853e
Comments 2020-06-08 12:48:57 -04:00
Christian Rocha 3647042096
Fix renderer bug where UI could be duplicated in inline-TUIs 2020-06-08 12:48:57 -04:00
Christian Rocha 2896e0e8e6
Remove now unused vars from old renderer 2020-06-08 12:48:57 -04:00
Christian Rocha fcbc427098
Properly shut down renderer when quitting program 2020-06-08 12:48:57 -04:00
Christian Rocha 87434a2569
Buffer/ticker-based renderer 2020-06-08 12:48:57 -04:00