Compare commits

..

No commits in common. "db32fd7a87396e22b7cf06c9ec0f599fd371eccf" and "3128ef793444b77f5bc74c591e1bc038b5709d3a" have entirely different histories.

5 changed files with 50 additions and 27 deletions

View File

@ -1,11 +1,6 @@
# 🎀 Changelog # 🎀 Changelog
## [2.2.1] - 2023-12-26 ## [2.2.0] - 2022-12-25
## Fixed
- Removed a left over debug print
- Recover panic in `hilbish.goro`
## [2.2.0] - 2023-12-25
### Added ### Added
- [Native Modules](https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.module/) - [Native Modules](https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.module/)
- Made a few additions to the sink type: - Made a few additions to the sink type:
@ -693,7 +688,6 @@ This input for example will prompt for more input to complete:
First "stable" release of Hilbish. First "stable" release of Hilbish.
[2.2.1]: https://github.com/Rosettea/Hilbish/compare/v2.2.0...v2.2.1
[2.2.0]: https://github.com/Rosettea/Hilbish/compare/v2.1.0...v2.2.0 [2.2.0]: https://github.com/Rosettea/Hilbish/compare/v2.1.0...v2.2.0
[2.1.2]: https://github.com/Rosettea/Hilbish/compare/v2.1.1...v2.1.2 [2.1.2]: https://github.com/Rosettea/Hilbish/compare/v2.1.1...v2.1.2
[2.1.1]: https://github.com/Rosettea/Hilbish/compare/v2.1.0...v2.1.1 [2.1.1]: https://github.com/Rosettea/Hilbish/compare/v2.1.0...v2.1.1

6
api.go
View File

@ -494,12 +494,6 @@ func hlgoro(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
// call fn // call fn
go func() { go func() {
defer func() {
if r := recover(); r != nil {
// do something here?
}
}()
_, err := rt.Call1(l.MainThread(), rt.FunctionValue(fn), c.Etc()...) _, err := rt.Call1(l.MainThread(), rt.FunctionValue(fn), c.Etc()...)
if err != nil { if err != nil {
fmt.Fprintln(os.Stderr, "Error in goro function:\n\n", err) fmt.Fprintln(os.Stderr, "Error in goro function:\n\n", err)

View File

@ -284,22 +284,56 @@ function Greenhouse:initUi()
ansikit.clear(true) ansikit.clear(true)
self:draw() self:draw()
while not done do hilbish.goro(function()
local c = read() while not done do
self:keybind('Ctrl-Q', function() local c = read()
done = true self:keybind('Ctrl-D', function()
end) done = true
self:keybind('Ctrl-D', function() end)
done = true
end)
if self.keybinds[c] then if self.keybinds[c] then
self.keybinds[c](self) self.keybinds[c](self)
else else
self:input(c) self:input(c)
end
--[[
if c == 27 then
local c1 = read()
if c1 == 91 then
local c2 = read()
if c2 == 66 then -- arrow down
self:scroll 'down'
elseif c2 == 65 then -- arrow up
self:scroll 'up'
end
if c2 == 49 then
local c3 = read()
if c3 == 59 then
local c4 = read()
if c4 == 53 then
local c5 = read()
if c5 == 67 then
self:next()
elseif c5 == 68 then
self:previous()
end
end
end
end
end
goto continue
end
]]--
::continue::
end end
end end)
while not done do
--
end
ansikit.showCursor() ansikit.showCursor()
ansikit.screenMain() ansikit.screenMain()
end end

View File

@ -4,6 +4,7 @@ bait.catch('hilbish.init', function()
if os.date '%m' == '12' and hilbish.interactive and hilbish.opts.crimmas then if os.date '%m' == '12' and hilbish.interactive and hilbish.opts.crimmas then
local crimmas = math.random(1, 31) local crimmas = math.random(1, 31)
print(crimmas)
if crimmas >= 25 and crimmas <= 29 then if crimmas >= 25 and crimmas <= 29 then
print(lunacolors.format '🎄 {green}Merry {red}Christmas{reset} from your {green}favourite{reset} shell {red}(right?){reset} 🌺') print(lunacolors.format '🎄 {green}Merry {red}Christmas{reset} from your {green}favourite{reset} shell {red}(right?){reset} 🌺')
end end

View File

@ -11,7 +11,7 @@ var (
// Version info // Version info
var ( var (
ver = "v2.2.1" ver = "v2.2.0"
releaseName = "Poppy" releaseName = "Poppy"
gitCommit string gitCommit string