Christian Rocha
c0f67a2927
Improve GoDocs
2020-07-29 20:50:00 -04:00
Christian Rocha
2f53eeb54b
Fix a bug in macOS terminal where stuff could get sucked into the scroll area
2020-07-13 11:39:04 -04:00
Christian Rocha
8d26b4ebd7
Use mouse consts in termenv
2020-06-25 12:42:31 -04:00
Christian Rocha
f3fd9decc9
Improve some comments
2020-06-24 12:14:35 -04:00
Toby Padilla
e90039d16e
Fix captured variable
2020-06-23 17:26:00 -04:00
Christian Rocha
de147c5061
Add mouse wheel support to pager example
2020-06-23 12:01:23 -04:00
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
673752658f
Comments and cleanup
2020-06-22 13:40:32 -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
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
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
683473c26d
Blind pass at adding high performance scrolling into the renderer
2020-06-16 22:06:46 -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
Christian Rocha
b10f6d6791
How about if we count the lines rendered correctly
2020-05-28 10:47:15 -04:00
Christian Rocha
e7130c9633
Remove an extraneous var and rename another var for clarity
2020-05-28 10:26:03 -04:00
Christian Rocha
99df3d4226
Only render if view has actually changed
2020-05-28 10:20:59 -04:00
Christian Rocha
3b8b011b5a
Rename to Bubble Tea (with the import name tea)
2020-05-25 19:48:36 -04:00
Christian Rocha
4bf40fbe62
Rename project to Boba
2020-05-12 16:39:08 -04:00
Christian Rocha
9dd9461dde
It's a safer bet not to render any extra newlines whatsoever
2020-05-11 23:07:48 -04:00
Christian Rocha
5ae602953c
Fix bug where extra blank line was being adding to output
2020-05-11 23:07:00 -04:00
Christian Rocha
b50ee76165
Subs shouldn't take a model as an argument
...
This also nullifies the need for SubMap
2020-05-04 18:52:44 -04:00
Christian Rocha
f93b752fcc
Remove ErrMsg and ModelAssertionErr
2020-04-22 11:00:30 -04:00
Christian Rocha
aa6d766e42
Catch errors when reading keyboard input
2020-04-22 10:39:43 -04:00
Christian Rocha
50b16d2df1
Model doesn't need to be a member of the Program struct
...
This also fixes a race condition
2020-04-22 10:31:43 -04:00
Christian Rocha
4351c9f903
Cmds no longer takes a Model as an argument, CmdMap no longer needed
2020-04-22 10:15:04 -04:00
Christian Rocha
4f2c60372d
Improve some comments
2020-04-20 14:08:27 -04:00
Christian Muehlhaeuser
bf92cd6cce
Add missing error handling
2020-04-17 20:35:54 +02:00
Christian Rocha
27416e9976
Add nil checks to CmdMap and SubMap functors
2020-04-10 15:43:32 -04:00
Christian Rocha
4a41a61919
Short-ciruit the message loop when processing batched commands
2020-04-03 18:31:40 -04:00
Christian Rocha
cd63ed1e44
Stop old subscription when it becomes reassigned as nil
2020-04-02 12:10:10 -04:00
Christian Rocha
2e509ad32c
Don't do command batching if the batch is 0 items long
2020-04-01 12:05:05 -04:00
Christian Rocha
1bf93b1ccf
Provisionally add `CmdMap` and `SubMap` functions
2020-03-31 16:28:16 -04:00
Christian Rocha
6e769686f1
Add support for command batching
2020-03-31 16:08:03 -04:00
Christian Rocha
5b001ee17f
Spinner example
2020-02-10 16:35:29 -05:00
Christian Rocha
02d3086885
Fix typos in comments
2020-02-10 12:44:04 -05:00
Christian Rocha
5383f5a61e
Wrap termenv altscreen functions to make things simpler for the end user
2020-02-01 21:07:35 -05:00
Christian Muehlhaeuser
f382f4db4a
Move ansi helpers to termenv
2020-01-31 13:52:20 +01:00
Christian Rocha
bb06373836
Whoops, accidentally commited this new Sub type idea
2020-01-29 21:37:37 -05:00
Christian Rocha
4b4655b14a
Note about project being a pre-release
2020-01-27 21:27:20 -05:00
Christian Rocha
444c36b31f
Rework subscriptions, allowing for them to be easily managed by the developer
2020-01-25 21:28:16 -05:00
Christian Muehlhaeuser
1c98700015
syslog is only available on unix systems
2020-01-25 07:15:56 +01:00
Christian Muehlhaeuser
bc67e3896b
Add platform-specific terminal init & restore
2020-01-25 07:15:29 +01:00
Christian Rocha
79af4ad6d5
More functional rendering approach
2020-01-22 16:15:30 -08:00
Christian Rocha
524cf2cffd
convenience function for creating an ErrMsg from an error
2020-01-20 10:54:58 -08:00
Christian Rocha
e1d4a14345
Commands should probably receive the model as an arg, right?
2020-01-20 10:35:03 -08:00
Christian Rocha
a318d24593
Fix a bug where the initial command wasn't running
2020-01-19 00:46:14 -05:00
Christian Rocha
824703a661
Remove stray log that was making rendering weird
2020-01-19 00:13:19 -05:00
Christian Rocha
6a0489592f
Programs should take an init type/function as the first argument
...
This is in line with the way Elm works. Also update examples.
2020-01-18 22:22:04 -05:00
Christian Rocha
11006d0a90
Move last render height info to the program level
2020-01-18 10:36:39 -05:00
Christian Rocha
b72cce8f00
Make a comment a little clearer
2020-01-18 10:34:28 -05:00
Christian Rocha
cfb899789e
Move ANSI stuff into its own file
2020-01-18 10:33:43 -05:00
Christian Rocha
d976902768
Okay, I think that's how error handling should work
2020-01-18 10:27:02 -05:00
Christian Rocha
9909356eb7
Left/right arrows move the text input cursor
2020-01-18 00:10:03 -05:00
Christian Rocha
208f421470
Refactor the keybinding stuff + add backspace
2020-01-17 20:46:34 -05:00
Christian Rocha
051a370769
Utility function for logging to the system log
2020-01-17 16:38:25 -05:00
Christian Rocha
4f42c502ed
Fullscreen mode via altscreen + fullscreen example
2020-01-17 15:37:04 -05:00
Christian Rocha
c1b4d6a515
Remove an extraneous argument and auto-add a trailing newline to views
2020-01-16 14:47:44 -05:00
Christian Rocha
f13ba01ff0
Fix a bug where the top line wasn't being cleared on render
2020-01-15 23:28:49 -05:00
Christian Rocha
da9de0c42b
More accurate names for prev/next line movement functions
2020-01-15 23:18:45 -05:00
Christian Rocha
0c8e2ea5a0
Add next line function in case we need it later
2020-01-15 23:04:53 -05:00
Christian Rocha
fe42b5c4a7
Clear necessary lines before rendering
2020-01-15 22:41:45 -05:00
Christian Rocha
c7f1302943
Remove extraneous select{} and improve comments
2020-01-14 17:56:51 -05:00
Christian Rocha
5999ff458c
Refactor subscription implementation
...
There was a bug in the previous implementation where it didn't
allow for more than one subscription.
2020-01-14 16:16:12 -05:00
Christian Rocha
147c8df2ee
Implement subscriptions, and update example accordingly
2020-01-13 17:11:10 -05:00
Christian Rocha
bee32ca733
Initial commit. First pass.
2020-01-10 16:02:04 -05:00